c++ array find the average mark, highest mark, lowest mark, number of students passing,

c++ array find the average mark, highest mark, lowest mark, number of students passing,

i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array.

01  #include<iostream>
02  using namespace std;
03  int main()
04  {
05      int gradeRange [4]= {0,0,0,0};
06      int mark = 0;
07      int counter = 0;
08   
09      while (mark < 101)
10      {
11       
12         cin >> mark;
13         if (mark > 100)
14  break;
15  if (mark >= 70)
16  gradeRange [3] ++;
17  else if (mark >= 40)
18  gradeRange [2] ++;
19  else if (mark >= 30)
20  gradeRange [1] ++;
21  else
22  gradeRange [0] ++;
23   
24  }
25  while (counter < 4)
26   
27  {
28  if (counter == 0)
29  cout << "0 - 29 ";
30  else if (counter == 1)
31  cout << "30 - 39 ";
32  else if (counter == 2)
33  cout << "40 - 69 ";
34  else
35  cout << "70 - 100 ";
36  for ( int i = 1; i <= gradeRange [counter] ; i ++)
37  {
38  cout << "*";
39  }
40  counter ++;
41  cout << endl;
42  }
43   
44  system("PAUSE");
45  }
View Answers

Ads









Related Tutorials/Questions & Answers:
c++ array find the average mark, highest mark, lowest mark, number of students passing,
c++ array find the average mark, highest mark, lowest mark, number of students passing,    i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array. 01
c++ array find the average mark, highest mark, lowest mark, number of students passing,
c++ array find the average mark, highest mark, lowest mark, number of students passing,    i need help in adding the c++ code for the average mark, highest mark, lowest mark, number of students passing, using array. 01
Advertisements
Reset( )and Mark( )
Reset( )and Mark( )  i am using buffer reader to read each line using... using mark() i have to specify the size. For a huge file, length has to be stored in long but mark only takes int type value.. any other function that i can
ModuleNotFoundError: No module named 'mark'
ModuleNotFoundError: No module named 'mark'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'mark' How to remove the ModuleNotFoundError: No module named 'mark' error
ModuleNotFoundError: No module named 'flake8-pytest-mark'
ModuleNotFoundError: No module named 'flake8-pytest-mark'  Hi, My... named 'flake8-pytest-mark' How to remove the ModuleNotFoundError: No module named 'flake8-pytest-mark' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'flake8-pytest-mark'
ModuleNotFoundError: No module named 'flake8-pytest-mark'  Hi, My... named 'flake8-pytest-mark' How to remove the ModuleNotFoundError: No module named 'flake8-pytest-mark' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'mark-search'
ModuleNotFoundError: No module named 'mark-search'  Hi, My Python... 'mark-search' How to remove the ModuleNotFoundError: No module named 'mark-search' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'mark_utils'
ModuleNotFoundError: No module named 'mark_utils'  Hi, My Python... 'mark_utils' How to remove the ModuleNotFoundError: No module named 'mark... have to install padas library. You can install mark_utils python
ModuleNotFoundError: No module named 'mdn-mark'
ModuleNotFoundError: No module named 'mdn-mark'  Hi, My Python...-mark' How to remove the ModuleNotFoundError: No module named 'mdn-mark... to install padas library. You can install mdn-mark python with following
ModuleNotFoundError: No module named 'nester_mark'
ModuleNotFoundError: No module named 'nester_mark'  Hi, My Python... 'nester_mark' How to remove the ModuleNotFoundError: No module named 'nester_mark' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'pyspider-mark'
ModuleNotFoundError: No module named 'pyspider-mark'  Hi, My... 'pyspider-mark' How to remove the ModuleNotFoundError: No module named 'pyspider-mark' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'doedu_mark_nester'
ModuleNotFoundError: No module named 'doedu_mark_nester'  Hi, My... named 'doedu_mark_nester' How to remove the ModuleNotFoundError: No module named 'doedu_mark_nester' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'flask-dev-mark-middleware'
ModuleNotFoundError: No module named 'flask-dev-mark-middleware'  Hi...: No module named 'flask-dev-mark-middleware' How to remove the ModuleNotFoundError: No module named 'flask-dev-mark-middleware' error? Thanks  
ModuleNotFoundError: No module named 'pytest-mark-no-py3'
ModuleNotFoundError: No module named 'pytest-mark-no-py3'  Hi, My... named 'pytest-mark-no-py3' How to remove the ModuleNotFoundError: No module named 'pytest-mark-no-py3' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'flask-dev-mark-middleware'
ModuleNotFoundError: No module named 'flask-dev-mark-middleware'  Hi...: No module named 'flask-dev-mark-middleware' How to remove the ModuleNotFoundError: No module named 'flask-dev-mark-middleware' error? Thanks  
ModuleNotFoundError: No module named 'Mark_print_nested_list'
ModuleNotFoundError: No module named 'Mark_print_nested_list'  Hi...: No module named 'Mark_print_nested_list' How to remove the ModuleNotFoundError: No module named 'Mark_print_nested_list' error? Thanks   Hi
ModuleNotFoundError: No module named 'mark-python-client'
ModuleNotFoundError: No module named 'mark-python-client'  Hi, My... named 'mark-python-client' How to remove the ModuleNotFoundError: No module named 'mark-python-client' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'scrapy-selenium-mark'
ModuleNotFoundError: No module named 'scrapy-selenium-mark'  Hi...: No module named 'scrapy-selenium-mark' How to remove the ModuleNotFoundError: No module named 'scrapy-selenium-mark' error? Thanks   Hi
ModuleNotFoundError: No module named 'visitor_mark_down'
ModuleNotFoundError: No module named 'visitor_mark_down'  Hi, My... named 'visitor_mark_down' How to remove the ModuleNotFoundError: No module named 'visitor_mark_down' error? Thanks   Hi, In your
Highest average score among 25 students
Highest average score among 25 students  a program that prompts... again the grade) calculate average per student and will calculate the highest average among students who should be printed. how can i solve this problem
Java programs on students assesment
40 marks in all the three subjects) (iv) Find the average of all the three...) Output the Student name, Student id, subject marks, average mark and the grade...Java programs on students assesment  1) Write a Java program
ask user how many numbers to be inputted and determine the sum and highest number using an array in java
ask user how many numbers to be inputted and determine the sum and highest number using an array in java  ask user how many numbers to be inputted and determine the sum and highest number using an array in java
array of students with marks list
array of students with marks list  There are 4 array of numbers... across all lists and also the number of students (4 in this case). Marks List 1... numbers (best scores) as arrays preserving the order of students. The number
read a positive real numbers from highest to lowest
read a positive real numbers from highest to lowest  write a java program that will read a sequence of 10 positive real nos. entered by the user and will print the same numbers in sorted order from lowest to highest using arrays
the grade of students
a number of students in a class. Then, prompt user to input the student√Ę‚?¨‚?Ęs programming mark. Determine how many student get A+ and A for their grade and how many students get D and E based on the following table: Marks
determine the top 10 highest and 10 lowest in java
determine the top 10 highest and 10 lowest in java  hello, I have a case, where there are tables in the database and have a file borrowing that contains the codebooks and namesmembers. I want to make 10 the highest rank anyone
how to find [count the number of integers whose value is less than the average value of the integers]
how to find [count the number of integers whose value is less than the average... amount to the screen integers from an operator at a terminal, and count the number of integers whose value is less than the average value of the integers. Your
adding a method to calculate a students grade
which displays a students name, id and mark works fine. But when i tried to add...)) grade = 'C'; else if ((mark > 40) &...)) grade = 'C'; else if ((mark > 40) && (mark <= 50
Passing array element
Passing array element  What about passing an element of an array? If I have array of objects and pass functionA(arr[2]); Then functionA() will get arr[2] as a value type or a reference type
JDBC : Find Lowest salary
JDBC : Find Lowest salary In this tutorial, we are showing how to find record of lowest salary in table employee. MIN() : MIN() method returns the lowest value of the specified field. So when you want to get lowest value of any
Number in array
Number in array  How to write a program to check the number that we are entered from keyboard is in the given array

Ads