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.
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.
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; }
Write a program that prompts the user to enter an integer number between 1 and 999....
Write a program that prompts the user to enter an integer number between 1 and 999. The program displays the sum of all digits in the integer if the input is valid; otherwise, it displays a message indicating that the integer is not between 1 and 999 and hence, is invalid. Name the program file Q1.cpp Example: if the user enters 12, sum of digits is 3. If the user enters 122, sum of digits is 5.
design a program that prompts the user to enter a positive integer number and reads the...
design a program that prompts the user to enter a positive integer number and reads the user’s input. If the user input is not a positive number, the program should prompt them repeatedly until they enter a valid input. Once a valid input is received ,the program uses a loop to calculate the sum of the digits of the user’s input and displays the sum. For example, if the user enters the number 94311, the program should print the sum...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT