#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
cout<<"www.moznum.blogspot.com"<<endl<<endl;
float x=0,eng=0,pf=0,be=0,ict=0,isl=0,aggregate=0,total=0,obtained=0,percent=0;
cout<<endl<< "Enter the Total marks out of you've otained marks: ";
cin>>total;
cout<<endl<<"Enter marks of 1st Subject: ";
cin>>eng;
cout<<"Enter marks of 2nd Subject: ";
cin>>pf;
cout<<"Enter marks of 3rd Subject: ";
cin>>be;
cout<<"Enter marks of 4th Subject: ";
cin>>ict;
cout<<"Enter marks of 5th Subject: ";
cin>>isl;
obtained=eng+pf+ict+isl+be;
percent= (obtained / total)*100;
cout<<"Percentage is: "<<percent<<"%"<<endl;
if(percent > 89 && percent < 100)
cout<<"OUTSTANDING A+"<<endl;
else if(percent>79&&percent<90)
cout<<"Excellent A"<<endl;
else if (percent>69&&percent<80)
cout<<"Good B"<<endl;
else if(percent>59&&percent<70)
cout<<"Fair C"<<endl;
else if(percent>49&&percent<60)
cout<<"Satisfactory D"<<endl;
else if(percent<50)
cout<<"Fail F"<<endl;
getche();
return 0;
}
- C++ program which takes base and height as input and gives the area of a rectangle
- How to write a C++ program that prints the factors of the number and also prints that a number is a prime number or a composite number by taking the number from the user.
- C++ Program to Print multiplication tables of a number by taking input to the desired number.
- How to write a C++ program that prints the factors of the number and also prints that a number is a prime number or a composite number by taking the number from the user.
- C++ Program to Print multiplication tables of a number by taking input to the desired number.
Hi to all i have to used function i have written a programme to accept marks but how to write code ina same programme to show the grades in c++
ReplyDeleteThis question confuses me
ReplyDeleteSuppose we want to compile a student academic report for a high school learner in grade 12 (matric).
A matric learner is enrolled for 6 study units (subjects), namely: English, Mathematics, Life Orientation,
History, Computer literacy, Geography. The learner has to pass at least four subjects, including English,
to complete grade 12. The subject pass mark is 50%.
Write a program that prompts the learner to key in their marks for each subject. The program should
include the following functions:
a. A function studentDetails, that prompts the learner to key in their personal details
name,surname, and schoolName. (3)
b. A function getMarks, that prompts the learner to key in a mark for each of the six subjects, and
validate the marks. Do not accept marks lower than 0 or higher than 100. (3)
c. A function calcAverageYearMark, to calculate and display the average of the 6 Subjects. This
function should be called just once by main, and should be passed the 6 Subject marks. (6)
d. A function minMax, to find and return the lowest and the highest of the 6 subject marks
passed to it as the subject with the lowest mark;
not a great
ReplyDeletetbrevfrbghnrjmymjnhbgvfcwdfvvgbhnjynu5ny4tr3vtvbny5y4bte
ReplyDelete6mun5ybtvtbnhjm6ik,7o.8n65yb4tv3rtb4yn
ReplyDelete