(a)
The following cin statement will pause the screen while the user enters the given data.
(b)
The following cin statement will pause the screen while user enters the given data.
(c)
The following cin statement will pause the screen while user enters the given data.
(d)
The following cin statement will pause the screen while user enters the given data.
(e)
The following cin statement will pause the screen while user enters the given data.
(f)
The following cin statement will pause the screen while user enters the given data.
(G)
The following cin statement will pause the screen while user enters the given data.
(h)
The following cin statement will pause the screen while user enters the given data.
(i)
The following cin statement will pause the screen while user enters the given data.
Want to see the full answer?
Check out a sample textbook solutionChapter 3 Solutions
C++ for Engineers and Scientists
- (b) Which of the following statements are true? In each case you should justify your argument informally. X + X * 2 i. {x > Y} {x - Y > 0} Y +Y div 2 ii. {x is even} X + x+1 X + 2 * X {x is odd} X + 2 * Y iii. {x = Y} {x = Y} Y + 2 * Xarrow_forward(Yes/No): Can an inline statement refer to code labels outside the __asm block?arrow_forward(Python 3) LULU Shopping wants to calculate the Commission given their employee. The program should ask the user to the number of items, and the unit amount. The sales bill is computed by multiplying the number of items and the unit amount A commission is computed based on the Sales as shown in the table below: sales bill commission 1 – 150 10% of the sales bill More than 150 18% of the sales bill Display the Sales bill and the commission.arrow_forward
- Q1) A scientist needs your help to find the sum of the following series: x3 x5 + 4 6 X - scientist will provide you with the following: The number of terms The value of x 8 +.....] Write a C-program to help the scientist to accomplish his task. Hint: use #include to find the power using pow() function.arrow_forward(Rounding Numbers) Function floor can be used to round a number to a specific decimal place. The statementy = floor(x * 10 + 0.5) / 10;rounds x to the tenths position (the first position to the right of the decimal point). The statementy = floor(x * 100 + 0.5) / 100;rounds x to the hundredths position (the second position to the right of the decimal point). Write a program that defines fourfunctions to round a number x in various ways:A. roundToInteger(number)B. roundToTenths(number)C. roundToHundredths(number)D. roundToThousandths(number)For each value read, your program should print the original value, the number rounded to the nearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth and the number rounded to the nearest thousandth.arrow_forward(iii) In C++ language create a program to input an integer q from the user and display the string formed by the concatenation of all characters having ASCII value equal to q in the string equal below. The value of q will be in the range [0, 255] only. S = "fgfhgh56@%6ggaghji"arrow_forward
- (Rounding Numbers) Function floor may be used to round a number to a specific decimalplace. The statementy = floor(x * 10 + .5) / 10;rounds x to the tenths position (the first position to the right of the decimal point). The statementy = floor(x * 100 + .5) / 100;rounds x to the hundredths position (the second position to the right of the decimal point). Writea program that defines four functions to round a number x in various waysa) roundToInteger(number)b) roundToTenths(number)c) roundToHundreths(number)d) roundToThousandths(number)For each value read, your program should print the original value, the number rounded to thenearest integer, the number rounded to the nearest tenth, the number rounded to the nearest hundredth, and the number rounded to the nearest thousandth.arrow_forward(C PROGRAMMING ONLY) 1. Leap Year Detectorby CodeChum Admin Let’s try to find out whether a year has 365 or 366 days. To do this, we need to create a leap year detector! Conditions for a leap year: 1.) year must be divisible by 4 and not divisible by 100 2.) If year is divisible by 100, it must be divisible by 400 for it to be a leap year. Instructions: You are provided with the isLeapYear() function which is already declared and defined for you.Your task is to ask the user for a year and then call the isLeapYear function to check whether the year is a leap year or not.Input 1. Year to be checked Output If a certain year is a leap year, print "<INSERT_YEAR_HERE> is a leap year"Otherwise, print "<INSERT_YEAR_HERE> is not a leap year" Enter year: 20202020 is a leap yeararrow_forward(Use Python) The function course_average should calculate and return the average of the three values pass to it. The function main should ask the user to enter three grades and then pass these values to the course_average function. This function should also display a message to the user in the format below. For example, if the user entered 100, 90 and 95 the message would be:The average of 100 , 90 and 95 is 95arrow_forward
- Language: C++ (Apartment problem) A real estate office handles , say, 50 apartment units. When the rent is, say, $600 per month, all the units are occupied. However, for each, say $40 increase in rent, one unit becomes vacant. Moreover, each occupied unit requires an average of $27 per month for maintenance. How many units should be rented to maximize the profit? Write a program that prompts the user to enter: The total number of units. The rent to occupy all the units. The increase in rent that results in a vacant unit. Amount to maintain rented unit. The program then outputs the number of units to be rented to maximize the profit. Note: Please include the pseudocodearrow_forward(Using Python)Write program to ask user to enter number and assign to variable points. Write an if-else statement that determines whether the points variable is outside the range of 17 to 81. If the variable’s value is outside this range it should display “Invalid points”, otherwise ,It should display “Valid points”arrow_forwardPS:Please type not write on paper 7) Simplify the following Boolean functions correctly:arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr