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

  Build a table of reynolds numbers at flow velocities

Write a program code to compute and build a table of Reynolds numbers at flow velocities varying from 100 to 1000 ft/sec (at increments of 100)

  By a minimal interpretation that makes a formula

By a minimal interpretation that makes a formula true, we mean that if one atom is removed from the interpretation then the resulting interpretation does no longer make the formula true.

  Write a program in c that will find smallest value

Write a programe c that will find the smallest, largest and average values in a collection of N numbers.Get the value of N before scanning each value in the collection of N numbers.

  Create a customer profile class.

a. Create a CustomerProfile class. Each CustomerProfile contains a last name, phone number, and bit fields indicating whether the customer:

  Problems on oops

Problems on OOPS

  Design and implement a library system

Design and implement a library system that does the following: ? Takes details of a student/library users: first name, last name, other names, user ID number, and nationality.

  Program to translates letter grade into number grade

In C++ (should be able to compile in Visual Studio 2010): Write a program to translates letter grade into number grade. Letter grades are A,B,C,D and F, possibly followed by a + or -.

  Use a define statement to create a constant

Follow these specifications: Use a define statement to create a constant that will hold your student number. You should have separate string variables for your first and last name; name these first_name and last_name.

  Create program to input miles driven and gallons used

Create a program in C++ which will input miles driven and gallons used (both as integers) for each tankful. Program must compute and display the miles per gallon

  Modify it so it gives the ith largest number

the follow code gives the ith smallest number, how do you modify it so it gives the ith largest number ?

  Write a c function void print_triangle(int n)

Write a C function void print_triangle(int n) that prints a triangular pattern of asterisks of height n and width 2 * n + 1 with one asterisk in the first line, three in the second line, etc.,

  A constructor and a destructor

A constructor and a destructor, Insert a new element chosen by the user at the correct place in the list

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