If
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Prelude to Programming
Additional Engineering Textbook Solutions
C Programming Language
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
C How to Program (8th Edition)
Starting Out with C++ from Control Structures to Objects (9th Edition)
Web Development and Design Foundations with HTML5 (9th Edition) (What's New in Computer Science)
- // A standard mortgage is paid monthly over 30 years.// This program is intended to output 360 payment coupons// for each new borrower at a mortgage company.// Each coupon lists the month number, year number,// and a friendly mailing reminder.start Declarations num MONTHS = 12 num YEARS = 30 string MSG = "Remember to allow 5 days for mailing" num acctNum num yearCounter housekeeping() while acctNUm <> QUIT printCoupons() endwhile finish()stop housekeeping() print "Enter account number or ", QUIT, " to quit " input acctNumreturn printCoupons() while yearCounter <= YEARS while monthCounter <= MONTHS print acctNum, monthCounter, yearCounter, MSG monthCounter = monthCounter + 1 endwhile endwhile output "Enter account number or ", QUIT, " to quit " input acctNumreturn finish() output "End of job"returnarrow_forward9. Give the output of the expression below: firstName= "Thebe" string str4 = "It is written.."; string str5 = firstName + "knows that" + str4; cout << str5.size() << endl; A. 28 B. No output C. 31 D. 30arrow_forwardC++ Write a program that prompts the user to enter the number of students and each student's name and score. and finally displays the name and score of the student with the highest score and the average score.arrow_forward
- Write a program that asks the user for a number in the range of 1 through 7. The programshould display the corresponding day of the week, where 1 = Monday, 2 = Tuesday, 3 =Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday, and 7 = Sunday. The program shoulddisplay an error message if the user enters a number that is outside the range of 1 through 7arrow_forwardWrite an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333….]arrow_forwardwrite a program to display fruit sales receipts. Apple: Pink Lady - $4.99/kilo, Fuji - $5.99/kilo. Orange: Hamlin - $2.99/kilo, Moro - $3.99/kilo. The program must use if-else statements and string format. The program must work exactly like the following examples. Each column occupies 15 spaces and is in the right alignment.arrow_forward
- Write two cin statements to get input values into birthMonth and birthYear. Then write a statement to output the month, a dash, and the year. End with newline. Remember that outputting 'endl' outputs a newline.Ex: If the input is 1 2000, the output is:1-2000 #include <iostream>using namespace std; int main() { int birthMonth; int birthYear; /* Your solution goes here */ return 0;}arrow_forwardcorrect the code and and identify the name of error in the below code? String number = “1”; switch ( number ) { case 1: System.out.println( "The number is 1" ); break; case 2: System.out.println( "The number is 2" ); break; default: System.out.println( "The number is not 1 or 2" ); break; }arrow_forwardPrint "user_num1 is negative." if user_num1 is less than 0. End with newline. Assign user_num2 with 1 if user_num2 is greater than 12. Otherwise, print "user_num2 is less than or equal to 12.". End with newline. My code: user_num1 = int(input())user_num2 = int(input()) if user_num1 < 0: print("user_num1 is negative.") if user_num2 > 12: user_num2 == 1 else: print("user_num2 is less than or equal to 12.") print('user_num2 is', user_num2) When the input is 0 and 13 my output for user_num2 is 13 and it should be 1. I don't know what I'm doing wrong.arrow_forward
- please no copy from internet Q1- Write a Java program that uses the do-while statement to print the multiplies of 5 in between (5 and 60) except the number 50the output looks like:5-10-15-20-25-30-35-40-45-55-60arrow_forwardwhich functions you would use to read the following string from a users input: "This is a fun day" A. cin >> B. cin.get function c. getline function d. all of the abovearrow_forwardLET the user print his name and ask him as it is am or pm and print the message accordingly hi name good morningarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT