(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
- /arrow_forward(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
- (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_forward5. (Algebra: solve 2 X 2 linear equations) You can use Cramer's rule to solve the following 2 X 2 system of linear equation: ax + by = e cx + dy = f ● x = ed - bf bc ad y = af - ec ad bc - Write a program that prompts the user to enter a, b, c, d, e, and f and display the result. If ad- bc is 0, report that The equation has no solution. Enter a, b, c, d, e, f: 9.0, 4.0, 3.0, -5.0, -6.0, -21.0 Enter x is -2.0 and y is 3.0 Enter a, b, c, d, e, f: 1.0, 2.0, 2.0, 4.0, 4.0, 5.0 Enter The equation has no solutionarrow_forwardInstructions(C++) A company hired 10 temporary workers who are paid hourly and you are given a data file that contains the last name of the employees, the number of hours each employee worked in a week, and the hourly pay rate of each employee. You are asked to write a program that computes each employee’s weekly pay and the average salary of all employees. The program then outputs the weekly pay of each employee, the average weekly pay, and the names of all the employees whose pay is greater than or equal to the average pay. If the number of hours worked in a week is more than 40, then the pay rate for the hours over 40 is 1.5 times the regular hourly rate. Use two parallel arrays: a one-dimensional array to store the names of all the employees (Name) a two-dimensional array of 10 rows and 3 columns to store the number of hours an employee worked in a week (Hrs Worked), the hourly pay rate (Pay Rate), and the weekly pay (Salary). Your program must contain at least the following…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_forward6. (Summing Integers) Write a program that uses a for statement to sum a sequence of integers. Assume that the first integer read specifies the number of values remaining to be entered. Your program should read only one value per input statement. A typical input sequence might be 5 100 200 300 400 500 where the 5 indicates that the subsequent 5 values are to be summed.arrow_forwardNeed help with this C++ code. Thank you.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_forwardLanguage: 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(GC201): Visual Programming Sheet 5 Question #1: Write a VB program that takes as input a string and displays the string with every even index of letters capitalized. The processing must be in a subroutine procedure and the result should be displayed in the event procedure (button click).( Evaluation) Convert sara convert SaRaarrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr