04-07-2005, 11:21 PM
All variables should be declared at the start of the program. Variable names should reflect their function. Proper indentation conventions for source code should be followed.
Write a program that reads account information from the user and stores that information in a sequential access file. When the user is finished entering the input, your program should then display the contents of the file using a neat report format as shown below. Use the sample input and output listings to guide you.
Enter account number (1 to 100, -999 to end): ? 27
Enter client's last name: ? Blank
Enter account number (1 to 100, -999 to end): ? 10
Enter client's last name: ? Til
Enter account number (1 to 100, -999 to end): ? 98
Enter client's last name: ? Ort
Enter account number (1 to 100, -999 to end): ? 36
Enter client's last name: ? Fass
Enter account number (1 to 100, -999 to end): ? 52
Enter client's last name: ? Mil
Enter account number (1 to 100, -999 to end): ? -999
Here are the records you entered:
Rec# Account Name
1 27 Blank
2 10 Til
3 98 Ort
4 36 Fass
5 52 Mil
End of Report
Press any key to continue
Write a program that reads account information from the user and stores that information in a sequential access file. When the user is finished entering the input, your program should then display the contents of the file using a neat report format as shown below. Use the sample input and output listings to guide you.
Enter account number (1 to 100, -999 to end): ? 27
Enter client's last name: ? Blank
Enter account number (1 to 100, -999 to end): ? 10
Enter client's last name: ? Til
Enter account number (1 to 100, -999 to end): ? 98
Enter client's last name: ? Ort
Enter account number (1 to 100, -999 to end): ? 36
Enter client's last name: ? Fass
Enter account number (1 to 100, -999 to end): ? 52
Enter client's last name: ? Mil
Enter account number (1 to 100, -999 to end): ? -999
Here are the records you entered:
Rec# Account Name
1 27 Blank
2 10 Til
3 98 Ort
4 36 Fass
5 52 Mil
End of Report
Press any key to continue