Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process c++ array find the average mark, highest mark, lowest mark, number of students passing,
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ramnath
c++ array find the average mark, highest mark, lowest mark, number of students passing,
0 Answer(s)      2 years and 6 months ago
Posted in : Development process


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  }

Advertisement
View Answers

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
ShortBuffer in java, How to reset the mark of short buffer.
;} } Output C:\>java ResetMark Previous mark position of buffer : 3...ShortBuffer in java, How to reset the mark of short buffer. In this tutorial, we will see how to reset the mark of short buffer. ShortBuffer API
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
how to mark different colors for diffent rows - Java Beginners
how to mark different colors for diffent rows  Hi, i have drawn a simple table using swings and now i want to mark diffent colors for each row..."}, {"C","Mumbai","333333"}, {"D","Chennai","444444"}, {"E
how to mark different colors for diffent rows - Java Beginners
how to mark different colors for diffent rows  Hi frends, Actually yesterday i had a question that, how can i mark colors to my rows in the table..."}, {"B","Agra","222222"}, {"C","Mumbai","333333
can we mark the class with abstract..with out having any mothed in tit as abstract!!! - Java Beginners
can we mark the class with abstract..with out having any mothed in tit as abstract!!!  hi, can we wite an calls without any abstract methods in it  Hi Friend, No, you can't create abstract class without abstract
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
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
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
c++ - AOP
% of the examination mark plus 40% of the coursework mark.the average final mark for each...c++  hi friends,i got this question and i need u help. "Two subjects... student,the following details are available: a candidate number -4 digits
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
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE
USE ARRAY TO FIND THE LARGEST NUMBER AND OCCURRENCE  i have some exercise from my lecturer and I still can't understand about ARRAY. here it is: write a program that reads 10 numbers from the keyboard. find the largest number
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
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
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
Find Second Largest Number from an Array
Find Second Largest Number from an Array This section illustrates you how to find the second largest number from an array. For this purpose, we have allowed... among them. Pulls the largest number out from the array and again check
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
JDBC : Find Highest salary
JDBC : Find Highest salary In this tutorial, we are showing how to find record of highest salary employee. MAX() : MAX() method returns the highest value of the specified field. So when you want to get highest value of any field
Determine Average by removing Largest and Smallest Number
. These numbers are then stored into an array in order to find the largest and smallest number. Now to remove these highest and lowest numbers from the array, we have...Determine Average by removing Largest and Smallest Number In this section, you
Average of Array
Average of Array       In this section, we will learn how to get an average of array. For this, first... that calculates the average of array (result/nums.length). And finally it will display
HTML5 mark tag, Example of &lt;mark&gt; tag in html5.
HTML5 mark tag, Example of <mark> tag in html5. In this tutorial, We... with the surrounding text . We can mark the text using many properties from... attribute is used with this tag. Example: mark_tag.html. <
Objective C Message Passing
Objective C Message Passing  What exactly a message passing means in Objective C? and how can i pass a message to a method
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
Check whether highest number is even or odd
Check whether highest number is even or odd In this section, you will learn how to check highest number between the two numbers and then determine whether... the highest number.After getting the highest number, we have created a condition
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
JDBC : Find second highest salary
JDBC : Find second highest salary In this section you will learn how to get record of employee having second highest salary. Find second highest salary... to find out second highest salary so you can write different logical query
JDBC : Find Third highest salary
JDBC : Find Third highest salary In this section you will learn how to get record of employee having second highest salary. Find Third highest salary... to find out third highest salary so you can write different logical query
JavaScript array passing
JavaScript array passing     ... an example of passing array to the methods or functions. When any array object... are passed by reference therefore you can find the changes in the array. Full example
 

 

 

DMCA.com