Question
All those 3 programs are smaller programs!!
Write a C++ program that allows a user to input customer records (ID
number, first name, last name, and balance owed) and save each record to a
file. You must ask the user for the file name to be created and you must check
to make sure the file opened properly. Write a loop that allows the user to enter
names until they wish to quit. Write a second C++ program that reads the file created in step one and displays
the records to the screen. You must ask the user for the file name to be read
and you must check to make sure the file opened properly. Print the information
in a neat table. Last, write a 3rd C++ program that asks the user to enter an ID number, searches
the file for the ID number and displays the data for the user.
found, display an error message. Put this in a loop.
Explanation / Answer
// Student: James // Date: 08/18/2009 // Class: CSCI 123 ("Intro to Programming Using C++") // Instructor: Mr. Ding // Program: Chapter 01 Programming 08: Calculate cents of coins // // Description: // This program calculates the monetary value of a number of quarters, dimes, // and nickels from the user input. The user is prompted for the numbers of // quarters, dimes, and nickels. Then the sum of all cents of coins is // calculated and displayed to the standard output screen. // // Sample output: // Enter number of quarters: 5 // Enter number of dimes: 3 // Enter number of nickels: 7 // The monetary value of your coins is 190 cents. #include using namespace std; // Function main: // This main function let us do following: // 1. Prompt user to input the number of quarters and receive to a variable // 2. Prompt user to input the number of dimes and receive to a variable // 3. Prompt user to input the number of nickels and receive to a variable // 4. Calculate the sum of the total cents // 5. Display the results to stdout // // Input: none // Output: none int main() { int quarters, dimes, nickels, total; // Input the number of quarters // Input the number of dimes // Input the number of nickels // Calculate the total // Output the total return 0; } // end of "main"