Question

which of the following prompts the user to enter an hourly pay rate?

which of the following prompts the user to enter an hourly pay rate?

Homework Answers

Answer #1

which of the following prompts the user to enter an hourly pay rate?

a. cout >> "Pay rate per hour? ";

b. cout << "Pay rate per hour? ";

c. cout >> "Pay rate per hour? ":

d. cout << "Pay rate per hour? ":

Answer:

  • option a and c are wrong because, standard output stream cout operator is "<<" not ">>".
  • ">>" is the operator for standard input stream cin which takes input.
  • cout is used to print and it's operator is "<<".
  • d is the wrong answer because it is ended with symbol ":" not semi colon.
  • semi colon is the end of statement symbol.
  • so a,c and d are wrong answers and b is the right answer.
  • option b uses << operator and ended with semi colon.
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
In Python only. Write a program that prompts the user to enter a hex character and...
In Python only. Write a program that prompts the user to enter a hex character and displays its corresponding decimal integer.
6.         Write a single statement that prompts the user to enter their age in years and places...
6.         Write a single statement that prompts the user to enter their age in years and places the integer value in a variable named age. 7.         Can a program place more than one statement on the same program line? 8.         Write a short code segment in Python that prompts the user to enter the number of quarters, dimes, nickels and pennies they have, compute the total value and print that value.
Write a complete program that prompts the user to enter the number of students and each...
Write a complete program that prompts the user to enter the number of students and each student’s score, then finally displays the highest score.(in C++)
Write a program that prompts the user to enter the currency exchange between US dollars and...
Write a program that prompts the user to enter the currency exchange between US dollars and the Chinese renminbi. prompt the user to enter 0 to convert from us dollars to Chinese RMB and 1 for vice versa. Prompt the user to enter the amount in US dollars or Chinese RMB to convert it to Chinese RMB or US dollars, respectively, Sample Run: Enter the exchange rate from dollars to RMB: 6.58 Enter 0 to convert dollars to RMB and...
Create a C++ Program that prompts the user to enter a number and compute for the...
Create a C++ Program that prompts the user to enter a number and compute for the factorial value. SAMPLE OUTPUT: ENTER A NUMBER: -5 zero & positive numbers only!!! ENTER A NUMBER: 5 Factorial of 5 : 5*4*3*2*1 = 120 DO NOT USE FUNCTION FOR THIS PROBLEM. THANK YOU   
Write a program that prompts the user to enter a string and displays the number of...
Write a program that prompts the user to enter a string and displays the number of characters it contains, fourth character, and last character. Note: The string may contain blanks. For example: “C++ programming is fun”. You should write a complete program.
Write a Java program and Flowchart that prompts the user to enter two characters and displays...
Write a Java program and Flowchart that prompts the user to enter two characters and displays the major and status represented in the characters. The first character indicates the major and the second is number character 1, 2, 3, 4, which indicates whether a student is a freshman, sophomore, junior, or senior. Suppose the following characters are used to denote the majors: I: Information Management C: Computer Science A: Accounting
Using C++ design a program that Prompts the User to enter 4 Numbers, then have the...
Using C++ design a program that Prompts the User to enter 4 Numbers, then have the program output those numbers entered in Ascending order. Use "if" statements to create the code...
Write a C program, called logic_abc.c, that prompts the user to enter three integers a, b,...
Write a C program, called logic_abc.c, that prompts the user to enter three integers a, b, c, and then computes the results of the following logical operations, in sequence: !a || !b++ && c (a-1 || b/2) && (c*=2) (a-- || --b) && (c+=2) a || !(b && --c)
Modify the program so that it prompts the user to enter an entire line, reads the...
Modify the program so that it prompts the user to enter an entire line, reads the line, then echoes the entire line. Read only one byte at a time from the keyboard.Explain what you did. #include int main(void) { char aLetter; write(STDOUT_FILENO, "Enter one character: ", 21); // prompt user read(STDIN_FILENO, &aLetter, 1); // one character write(STDOUT_FILENO, "You entered: ", 13); // message write(STDOUT_FILENO, &aLetter, 1); // echo character return 0; }
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT