Write a C++
cout << “This is the end of the program.\n”;
(Some systems require that final \n, and your system may be one of these.)
Want to see the full answer?
Check out a sample textbook solutionChapter 1 Solutions
Problem Solving with C++ (10th Edition)
Additional Engineering Textbook Solutions
Experiencing MIS
Starting Out With Visual Basic (7th Edition)
Web Development and Design Foundations with HTML5 (8th Edition)
Objects First with Java: A Practical Introduction Using BlueJ (6th Edition)
Computer Science: An Overview (12th Edition)
Starting Out With Visual Basic (8th Edition)
- Write a C++ program that Ask user to enter an integer number and then determine whether the number is prime or not? Note: a number is prime that it is only divisible by 1 and itself. such as 3,5,7,13,..arrow_forwardWrite a C++ program that will print out the following simple shapes: triangle, rectangle and diamond using different characters for each shape. Requirements:- each shape uses a different character and it must be exactly 5 lines.- for this exercise, please do not use loop but only simple printing characters.arrow_forwardWrite a C++ program that tells the user that the number entered is less than or greater than 10? Write a C++ program that tells the user that the number entered is even or odd? Write a menu driven C++ program that ask the user to choose the type in which he wants the output? Either he wants to convert the entered Celsius temperature in to Fahrenheit or Kelvin?arrow_forward
- Write a C program that input a single letter and prints out the corresponding digits on the phone. The letters and digits on a phone are grouped following way. 2 = ABC 3 = DEF 4 = GHI 5 = JKL 6 = MNO 7 = PRS 8 = TUV 9 = WXY No digits corresponds to Q and Z. For these two letters, your program should prints a message indicating that they are not used on a phone.arrow_forwardWrite a complete C++ program that asks the user for a number of gallons and then outputs the equivalent number of liters. There are 3.78533 liters in a gallon. Use a declared constant. Since this is just an exercise, you need not have any comments in your program.arrow_forwardWrite a C++ program that will allow the user to input the First Name, Last name, Middle Initial, and grade of a student. The following conditions must be observed: a. If the grade input is 96-100, the remark is “ you performed an excellent job! Keep it up !” b. If the grade input is 91-95, the remark is “ you performed a very satisfactory Job! Keep it up !” c. If the grade input is 86-90, the remark is “ you have satisfactory performance, you can improve some more. ” d. If the grade input is 80-85, the remark is “ your performance is fair, try harder” e. If the grade input is 75-79, the remark is “ your performance needs Improvement, you can do it” f. If the grade input is below 75, the remark is “ we’re sorry but you failed, we know you can do better next time” Test your program using the following TEST CASES: CASE 1: Input first name: Juan Input last name: Cruz Input middle Initial:…arrow_forward
- Write a C++ program that outputs the year's day number given a date in the format month-day-year. For example, if the date is January 1, 2006, the day number is 1; if the date is December 25, 2006, the day number is 359. A leap year should be checked by the program. A leap year is one that is divisible by four but not by one hundred. 1992 and 2008, for example, are divisible by 4, but not by 100. If a year is divisible by 100 and 400, it is considered a leap year. 1600 and 2000, for example, are divisible by 400. However, because 1800 is not divisible by 400, it is not a leap year.arrow_forwardWrite a program in C++ that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: Hello there Hey quit then the output is: ereht olleH yeHarrow_forwardYou are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you need to create a C++ program which reads in a Social Security number, a first name, a middle name or initial, and a last name from the file inData.dat. The name is written to file outData.dat in three different formats: Format 1: First name, middle name, last name, and Social Security number Format 2: Last name, first name, middle name, and Social Security number Format 3: Last name, first name, middle initial, and Social Security number Format 4: Last name, middle initial, last name Note: The social security number and name in three parts on file “inData.dat”, each separated by one or more whitespaces characters: 222-33-3543 Robert James Williams Output: Write data in file “outData.dat” with proper format: Robert James Williams 222-33-3543 Williams, Robert, James…arrow_forward
- Write a C++ program that reads two positive integers from the user that represent the numerator anddenominator of a fraction as its only two integers. Your program should reduce the fraction to lowest termsand then print both the numerator and denominator of the reduced fraction as its result. sample output: Enter a fraction: 6 / 63Lowest Terms: 2/21arrow_forwardWrite a C++ program that prompts the user to positive numbers, then it will display the sum and the average of them.arrow_forwardWrite a C++ Program to check whether a string is a palindrome or not. A palindrome is a word, verse, or sentence (such as " I ere I saw Elba") that reads the same backward or forward. In this task, the inserted string should consist of letters only (A to Z and a to z). In case of an invalid character is inserted, the output will be the phrase "Wrong entry". If the iserted string is palindrome, the output will be the word "Palindrome", else it will be "NOT Palindrome". The inserted string is case insensitive. IMPORTANT NOTE Do not add any cout statements except for the final answer as specified above. Do not add "Enter a number", "the number of digits is" or any similar prompts. Also note that the automatic grader is case-sensitive; so "palindrome" is wrong but "Palindrome" is right. Do not add any unnecessary spaces inside the strings of cout statements " ". You may add any libraries needed. I/O Program Input: A string consists of letters only Program Output: A phrase that shows…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr