Write a program that will input letters grade(a,b,c,d,f)

Assignment Help C/C++ Programming
Reference no: EM13163916

Write a program that will input letters grade(A,B,C,D,F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into array. A function will be called five times(once for each letter grade) and will return the total number of grades in that category. The function must be passed 3 parameters: the array, the number of elements in the array, and the letter to be searched for and counted (A, B, C, D or F). The program will print the number of each grade.

Additional Information:

Store all the input grades one by one in an array;

The function prototype looks like the following:

int countChar(char[], int, char);

The function will go through the array and count how many occurrences for the designated letter grade.

Sample Run:

Please input the number of grades to be read in.(1-50): 6

all grades must be upper case A B C D or F

?Input a grade: A

Input a grade: C

Input a grade: A

Input a grade: B

Input a grade: B

Input a grade: D

Number of As = 2

Number of Bs =2

Number of Cs = 1

Number of Ds = 1

Number of Fs = 0

???

??

 

 

Reference no: EM13163916

Questions Cloud

What is the thickness of the paint : If 1 gallon of paint can cover a square room and ceiling with walls that are 9.36 feet high and 9.36 long, what is the thickness of the paint (in micrometers)?
Design a phishing pages for a popular website : Design a "Phishing" Pages for a popular "PayPal" Website. Needs the Phishing pages like this first page: the login page that will request for login info (Email + pass) check paypal.com home page
Compute the equivanent weight of the acid : calculate the equivanent weight of the acid. (B) How many moles of protons were titrated? (C) How many moles of H3PO4 were titrated? (D) How many grams of H3PO4 were titrated?
How many grams of oxygen would be required in the combustion : How many grams of oxygen would be required in the combustion of propane to produce 582 kJ of heat?
Write a program that will input letters grade(a,b,c,d,f) : Write a program that will input letters grade(A,B,C,D,F), the number of which is input by the user (a maximum of 50 grades). The grades will be read into array. A function will be called five times(once for each letter grade) and will return the tota..
Write the balanced chemical equation for the combustion : Carbon dioxide is a green house gas that is linked to global warming. It is released into the atmosphere through the combustion of octane (C8H18) in gasoline.
State dangerous to attempt to carry out a distillation : Why is it extremely dangerous to attempt to carry out a distillation in a completely closed apparatus
Calculate the molarity of the hcl solution : A sample of 0.0020 mole of HCl is dissolved in water to make a 2000-mL solution. Calculate the molarity of the HCl solution, the [H3O+], and the pH. For a strong acid such as HCI, the [H3O+] is the same as the molarity of the HCl solution.
What is the vapor pressure of the water-ethylene glycol : A 51.0 g sample of ethylene glycol, HOCH2CH2OH, is dissolved in 540.0 g of water. The vapor pressure of water at 32°C is 35.7 mm Hg. What is the vapor pressure of the water-ethylene glycol solution at 32°C? (ethylene glycol is nonvolatile.)

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Searching f and removing certain states from the hash table

use the class hashT, ''Hashing: Implementation Using Quadratic Probing,'' which uses quadratic probing to resolve collision, to create a hash table to keep track of each state's information. Use the state's name as the key to determine the hash addre..

  State private portion of class to model the item

In c++ state the private portion of a class to model the given item: a class Date for dates consisting of a month, day and year. a class PhoneNumber for a telephone numbers consisting of area code, local exchange, and number.

  Calculate the trajectory of a soccer ball

Write a program to calculate the trajectory (flight path) of a soccer ball

  Program to store lists of names and ages in parallel arrays

Write a C++ program that stores lists of names (the last name first) and ages in parallel arrays and sorts the names into alphabetical order keeping the ages with the correct names.

  Write a corresponding if else statement

The mathematical operation max(x,y,w,z) can be represented by using the conditional expression operator, as in:  max = (x > y && x > z && x > w) ? x : ((y > z && y > w) ? y : ((z > w) ? z : w))  Write a corresponding if else statement that is equival..

  Design customized mailing lists for marketing department

Marketing department requires to be able to design customized mailing lists, to send different messages to different types of donors. What system will best meet these requirements?

  Write a recursive and iterative versions of binary search

in C++ write a recursive and iterative versions of binary search and compare their run times using the array a[i]=i, i=0,..., n-1

  Main function to input twenty integers in given range

Write a main function to input 20 integers in range of 1-6, function should count number of times the numbers 2 and 5 occur. function must declare statics variables count2 and count5.

  Program to output value of tenth component of array

Write a C++ statements to perform the following: Set value of fourth component of array alpha to three times  value of eight component minus 57.

  Pros and cons of choosing two servers

Classify the two alternatives in terms of what type of application architecture they use. b. Outline the pros and cons of the two alternatives and make a recommendation to Fred about which is better.

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd