Which attribute is used to define the font type
Which of the following apply to the while loop only? To the do...while loop only? To both?
a. It is considered a conditional loop.
b. The body of the loop executes at least once.
c. The logical expression controlling the loop is evaluated before the loop is
entered.
d. The body of the loop may not execute at all.
Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false:
a. !(x > 10)
b. x <= 5 || y < 15
c. (x != 5) && (y != z)
d. x >= z || (x + y >= z)
e. (x <= y - 2) && (y >= z) || (z - 2 != 20)
Suppose that x, y, and z are int variables, and x = 10, y = 15, and z = 20. Determine whether the following expressions evaluate to true or false:
a. !(x > 10)
b. x <= 5 || y < 15
c. (x != 5) && (y != z)
d. x >= z || (x + y >= z)
e. (x <= y - 2) && (y >= z) || (z - 2 != 20)
Which of the following apply to the while loop only? To the do...while loop only? To both?
a. It is considered a conditional loop.
b. The body of the loop executes at least once.
c. The logical expression controlling the loop is evaluated before the loop is
entered.
d. The body of the loop may not execute at all.
In main take two numbers as input num1 and num2. Main thread will create 2 more threads.
1. T1: Output sum of numbers from min(num1 , num2) to max(num1 , num2)
2. T2: Take a string as input and count num1 and num2 in it.
Write a C++ function, smallestIndex, that takes as parameters an int array and its size and returns the index of the first occurrence of the smallest element in the array. To test your function, write a mainthat prompts a user for a list of 15 integers and outputs the index and value of the first occurrence of the smallest value.
An example of the program is shown below:
Enter 15 integers:
1
2
3
4
5
6
7
8
9
0
10
11
12
13
14
1 2 3 4 5 6 7 8 9 0 10 11 12 13 14
The position of the first occurrence of the smallest element in list is: 9
The smallest element in list is: 0You can use the following integer lists to test your code:
main take two numbers as input num1 and num2. Main thread will create 2 more threads.
1. T1: Output sum of numbers from min(num1 , num2) to max(num1 , num2)
2. T2: Take a string as input and count num1 and num2 in it.
For this assignment Write a program in ‘C++’, that uses a Nested Structure to accept the name
of five Players of Chess:
Numbers of games played
Date of Birth
Date of playing first international game
Age
Status either win or loss
Use structures for Date of Birth and International Game in the main structure Chess.
struct chess
{
-------
-------
struct dob
{
------
------
};
struct igame
{
------
------
};
};
When the program runs, it should ask the user to enter data for five Players of Chess.
Paula and Danny want to plant evergreen trees along the back side of their yard. They do not want to have an excessive number of trees.
Write a program that prompts the user to input the following:
The program outputs:
Format your output with setprecision(2) to ensure the proper number of decimals for testing!