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,

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 3 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
C and C++ books
; Page 4 An array in C is a region of memory in which the elements can...-fashioned C string) and in the second case a zero-terminated array of XMLCh's... C and C++ books      
C and C++ books-page1
and the concepts involved with programming C++. You'll find the numerous examples of syntax... C and C++ books-page1       The C Books This is the online version of The C Book, second
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 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
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
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
Array in C
Array in C  Respected Sir, How can an array be an lvalue, if we can't assign to it? How can I set an array's size at run time? How can I avoid fixed-sized arrays? help me sir
how to find largest number? - Java Interview Questions
how to find largest number?  this is my java coding: import...); } } i don't know how to add code to find the largest number.. please help... want to find the greater number which user enter on the console? Thanks
C++ code to find Entropy
C++ code to find Entropy   consider a discrete memory less source with source s= { S0,S1,S2,S3} with probabilities P0=1/8 , P1= 1/8, P2=1/2 , P3=1/4 prove that h(s^3)=3h(s) using C++ program ? I try this but not true
CodeShare
CodeShare       The codeShare Eclipse plug-in was developed by Mark Drew and Ryan Everhart. This plug-in allows users to select and share code with other
C Array Declaration
C Array Declaration       In this section, you will learn how to declare an array in C. To declare an array in C, you have to specify the name of the data type and the number
Objective C Array
Objective C Array In a simple term we can say that array is a object, which is a collection of number of other objects. In Objective C, we can also add.... Syntax to declare an Array in Objective C: NSArray *myArray
Average
Average   I have created a file that reads in a text file for a combo box which are exams assignments and quizes. I then have a a textfield..., assignments, etc.) so I can have the average of each item. I then need to graph
Java count occurrence of number from array
Java count occurrence of number from array Here we have created an example that will count the occurrence of numbers and find the number which has the highest occurrence. Now for this, we have created an array of 15 integers
Passing array to jsp - JSP-Interview Questions
Passing array to jsp   Hi, I've a page with multiple check boxes, i can select multiple boxes at a time. On submit, i wish those all records to be populated in next screen. Pls suggest how can i achieve this. Thanks
Please help with this Q
, a variety of statistics should be displayed (e.g. average mark awarded, number of students passing, highest mark, and lowest mark)   The answer...[j]; j++; } System.out.println("Number of students passing "+passed
Find out last character of array
Find out last character of array  How we can find out the last character of array in java program
write a java program to print marklist of "n " students. input Register number, name and marks of three subjects.
write a java program to print marklist of "n " students. input Register number, name and marks of three subjects.  write a java program to print marklist of "n " students. input Register number, name and marks of three subjects
Find out the prime number
Find out the prime number      ... to find out whether a given number is prime or not. Here we have used the 'for loop' statement and given the required condition for a prime number. As we know
Find position of an array element
Find position of an array element In this section, you will learn how to find the index of an array element. For this, we have allowed the user to enter the array elements of their choice and also the number whose index value
How to create dynamic array in C?
How to create dynamic array in C?  How to create dynamic array in c programming language?   Dynamic Array in C Tutorial
Write a query to find the total number of rows in a table
Write a query to find the total number of rows in a table  Write a query to find the total number of rows in a table?   Hi, Here is the answer, we can find the total number of rows in a table using following query
 

 

 

DMCA.com