Alpha Geek

(8)

$10/per page/Negotiable

About Alpha Geek

Levels Tought:
University

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Environmental science,Essay writing,Programming,Social Science,Statistics Hide all
Teaching Since: Apr 2017
Last Sign in: 345 Weeks Ago, 4 Days Ago
Questions Answered: 9562
Tutorials Posted: 9559

Education

  • bachelor in business administration
    Polytechnic State University Sanluis
    Jan-2006 - Nov-2010

  • CPA
    Polytechnic State University
    Jan-2012 - Nov-2016

Experience

  • Professor
    Harvard Square Academy (HS2)
    Mar-2012 - Present

Category > Programming Posted 15 Jun 2017 My Price 4.00

Write a program whose main function is merely a collection of variable declarations and function calls

Write a program whose main function is merely a collection of variable declarations and function calls. This program reads a text and outputs the letters, together with their counts, as explained below in the function printResult. (There can be no global variables! All information must be passed in and out of the functions. Use a structure to store the information.) Your program must consist of at least the following functions:

• Function openFile: Opens the input and output files. You must pass the file streams as parameters (by reference, of course). If the file does not exist, the program should print an appropriate message and exit. The program must ask the user for the names of the input and output files.

• Function count: Counts every occurrence of capital letters A-Z and small letters a-z in the text file opened in the function openFile. This information must go into an array of structures. The array must be passed as a parameter, and the file identifier must also be passed as a parameter.

• Function printResult: Prints the number of capital letters and small letters, as well as the percentage of capital letters for every letter A-Z and the percentage of small letters for every letter a-z. The percentages should look like this: ‘‘25%’’. This information must come from an array of structures, and this array must be passed as a parameter.

Answers

(8)
Status NEW Posted 15 Jun 2017 10:06 AM My Price 4.00

-----------

Attachments

file 1497521146-Answer.docx preview (680 words )
#-----------inc-----------lud-----------e&a-----------mp;-----------lt;-----------ios-----------tre-----------am&-----------amp-----------;gt-----------; -----------//H-----------ead-----------er -----------fil-----------e f-----------or -----------fil-----------e s-----------tre-----------am ----------- #i-----------ncl-----------ude-----------&am-----------p;l-----------t;f-----------str-----------eam-----------&am-----------p;g-----------t; ----------- //-----------Hea-----------der----------- fo-----------r s-----------tri-----------ng ----------- #i-----------ncl-----------ude-----------&am-----------p;l-----------t;s-----------tri-----------ng&-----------amp-----------;gt-----------; -----------//H-----------ead-----------er -----------for----------- se-----------tpr-----------eci-----------sio-----------n f-----------unt-----------ion----------- #-----------inc-----------lud-----------e&a-----------mp;-----------lt;-----------iom-----------ani-----------p&a-----------mp;-----------gt;----------- u-----------sin-----------g n-----------ame-----------spa-----------ce -----------std-----------; -----------//f-----------unt-----------ion----------- to----------- re-----------ad -----------fil-----------e -----------voi-----------d r-----------ead-----------Fil-----------e(f-----------str-----------eam----------- &a-----------mp;-----------amp-----------;);----------- /-----------/st-----------art----------- of----------- ma-----------in -----------fun-----------tio-----------n -----------int----------- ma-----------in(-----------) -----------{ ----------- ----------- //-----------cre-----------ate----------- fi-----------le -----------str-----------eam----------- ob-----------jec-----------t ----------- ----------- fs-----------tre-----------am -----------fin-----------; ----------- ----------- st-----------rin-----------g f-----------ile-----------Nam-----------e; ----------- ----------- /-----------/op-----------en -----------fil-----------e.t-----------xt -----------in
Not Rated(0)