C How to Program (8th Edition)
C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
Question
Book Icon
Chapter 11, Problem 11.18E
Program Plan Intro

Program plan:

  • Modify program textFile as follows:
    1. Include one additional parameter ch of type int.
    2. Within the else contruct, based on value of ch call frprintf or printf to display the header for account information.
    3. Within the while loop of else construct, based on value of ch use fprintf or printf to display the content of client variable.
  • Modify program enterChoice as follows:
    1. Include one additional statement of choice i.e. 5- Display accounts on screen.
  • Modify the main function as follows:
    • Run the while loop till choice is not equal to 6.
    • Modifiy call of textFile in case 1 to provide the function additional argument i.e. choice.
    • Include case 5 to call the textFile function with additional argument i.e. choice.

Program description:

This program is the modified version of transaction processing program given in figure 11.15 of the book.This program included one more option i.e. to print the account details on screen instead of text file in addition to all other option of program in figure 11.15.

Blurred answer
Students have asked these similar questions
(Class Average: Reading Student Records from a CSV File) Use Python Use the csv module to read the grades.csv file from the previous exercise (exercise 9.3). Display the data in tabular format, including an additional column showing each student’s average to the right of that student’s three exam grades and an additional row showing the class average on each exam below that exam’s column. This is exercise 9.3 # Importing csv moduleimport csv# empty list to store datadata = []columns = ["firstname", "lastname", "grade1", "grade2", "grade3"]filename = "grades.csv"for i in range(3):firstname = input("Enter First Name : ")lastname = input("Enter Last Name : ")grade1 = float(input("Enter Grade 1 : "))grade2 = float(input("Enter Grade 2 : "))grade3 = float(input("Enter Grade 3 : "))data.append([firstname, lastname, grade1, grade2, grade3])print()# write data and columns as csv filewith open(filename, 'w') as csvfile:# creating a csv writer objectcsvwriter = csv.writer(csvfile)# writing the…
(JS)Write a function named "tweets" that takes a string as a parameter. If a message can hold at most 280 characters, calculate the smallest number of messages needed to hold all of the text in the input. The function should return the number it calculated.
Modified Programming ). (Count vowels and consonants, file input, nested-loops, switch statement) Assume that letters A, E, I, O and U are the vowels. Write a program that reads strings from a text file, one line at a time, using a while-loop. You do the following operations within each loop: • Read one line from the input file and store it in a string; Count the number of vowels and consonants (using either while-loop or for-loop) in the file string. The while-loop will terminate when the end-of-file is reached. After the loop is finished, the program displays the total number of vowels and consonants in the text file. [A text file, named “ass4_Q6_input.txt", is provided as your testing input file.]
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning