Given the following program, which line(s) cause(s) output t…
Given the following program, which line(s) cause(s) output to be displayed on the screen? 1 // This program displays my gross wages. 2 // I worked 40 hours and I make $20.00 per hour. 3 #include 4 using namespace std; 5 6 int main() 7 { 8 int hours; 9 double payRate, grossPay; 10 11 hours = 40; 12 payRate = 20.0; 13 grossPay = hours * payRate; 14 cout
Read DetailsWhat will be displayed after the following statements execut…
What will be displayed after the following statements execute?int funny = 7, serious = 15;funny = serious % 2;if (funny != 1){ funny = 0; serious = 0;}else if (funny == 2){ funny = 10; serious = 10;}else{ funny = 1; serious = 1;}cout
Read DetailsWrite a C++ code snippet (not a full program) that does the…
Write a C++ code snippet (not a full program) that does the following: Assign your first name to a variable using the appropriate data type. (2 points) Assign your age to a variable using the appropriate data type. (2 points) Output both your name and age to the console using cout. (2 points) You should include: Proper variable names Correct data types (float, char, etc.) Syntax that compiles (quotes, semicolons, etc.) Example Output (what your code should display): My name is Alex and I am 20 years old.
Read Details