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

  Add a sentinel command to stop the loop

add a sentinel command to stop the loop. When the program is compiled, It'll ask the user to type in a palindrome. I want the user to type EXIT to end the loop.

  Implement the guess the word

Implement  the ‘Guess the Word' game in an object-oriented manner

  To reverse the order of elements on a stack

Write a program in C++ to  reverse the order of elements on a stack S using two additional stacks using one additional stack

  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..

  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.

  Use a for loop to generate 100 random numbers.

Use a For Loop to generate 100 random numbers. Determine the most current maximum and minimum number as the random numbers are being generated. This is referred tp as a "running" maximum and minimum. Display the running maximum and minimum values as ..

  Write a program that plays a tic-tac-toe game.

Using functional decomposition, write a program that plays a tic-tac-toe game.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write a program that takes a positive integer

Write a program that takes a positive integer from the user and prints the rightmost digit of that integer. This is a sample output: Enter an integer: 1247

  Develop a simple poker game

Develop a simple poker game

  Use selection sort to sort a[48] into increasing order

Use selection sort to sort A[48] into increasing order, and then print out the sorted list in four rows. There may be duplicates, but that's OK. (65 and 53 appear twice.) Duplicates will appear next to each other in the sorted list.

  An integer on this system is 4 bytes long

Assume the following for the program below. An integer on this system is 4 bytes long. The memory address where the array "a[]" was created begins at location 8000. a. #include

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