Dec 12, 2011 at 12:19pm UTC
Create a program in c++ that calculate the prelim grade of an student...
This the sample
Output:
name of the student:________
course:________
course perception:_________
prelim grade
Quiz: _____
Assign: _____
Project: _____
Exam:_____
Attention:_____
the grade:_____
calculation:
Class Standing=(Quiz + Assign + Project)*90% +Attendance*10%
Prelim Grade=(CS*0.67)+(Exam*0.33)
thats all the simple problem,
who knows this siple c++ codes
Dec 12, 2011 at 1:15pm UTC
yes its simple and good problem i can create it, but i have a lot of exam this week :( if nobody help you i create this program at weekend.
Dec 13, 2011 at 1:06am UTC
onurr@sir i waiting for your help...
And thanks for your fedback....
Dec 14, 2011 at 12:21am UTC
help me sir i want to show the codes here ..
thanks and more power.,
Last edited on Dec 14, 2011 at 12:22am UTC
Dec 14, 2011 at 2:23am UTC
What have you tried doing?
It's better if you tried it on your own first, before going to someone and asking them to do your work. Just read the tutorial,viser, it gives you everything you need.
If you'r still having trouble, try writing it out on a piece of paper, then try again. If you still can't get it, come back, and I'll be glad to help you.
Last edited on Dec 14, 2011 at 2:33am UTC
Dec 14, 2011 at 8:43am UTC
Code Assassin@sir ill try my best about this and ill read also the tutorials but the output is not the corect answer ..
Sir plz help me about this ,for this code..
Im a beginners..
Once again thanks for your fedback...
,
Dec 17, 2011 at 11:17am UTC
#include<iostream>
#include<string>
using namespace std;
int main()
{
string name, course, courseperception;
int Quiz;
int Assign;
int Project;
int Exam;
int Attendance;
cout<<"Name:";
cin>>name;
cout<<"Course:";
cin>>course;
cout<<"Courseperception:";
cin>>courseperception;
double cs;
double pg;
cout<<endl;
cout<<"Quiz:";
cin>>Quiz;
cout<<"Assign:";
cin>>Assign;
cout<<"Project:";
cin>>Project;
cout<<"Exam:";
cin>>Exam;
cout<<"Attendance:";
cin>>Attendance;
cout<<endl;
cs=(Quiz+Assign+Project)/3*.90+Attendance*.10;
pg=(cs*0.67)+(Exam*0.33);
cout<<"________________"<<endl<<"Your Grade:"<<pg<<"\n";
return 0;
}
Dec 17, 2011 at 11:41am UTC
Hi,
I am starting again with C++ after taking years off. I would try it like this.
#include <iostream>
#include <string>
int main()
{
char name[20]="";
char course[20]="";
char courseperception[20]="";
int Quiz;
int Assign;
int Project;
int Exam;
int Attendance;
std::cout << "Name:" << name;
std::cin>>name;
std::cout<<"Course:";
std::cin>>course;
std::cout<<"Courseperception:";
std::cin>>courseperception;
double cs;
double pg;
std::cout << std::endl;
std::cout<<"Quiz:";
std::cin>>Quiz;
std::cout<<"Assign:";
std::cin>>Assign;
std::cout<<"Project:";
std::cin>>Project;
std::cout<<"Exam:";
std::cin>>Exam;
std::cout<<"Attendance:";
std::cin>>Attendance;
std::cout<<std::endl;
cs=(Quiz+Assign+Project)/3*.90+Attendance*.10;
pg=(cs*0.67)+(Exam*0.33);
std::cout<<"________________"<<std::endl<<"Your Grade:"<<pg<<"\n";
return 0;
}
Code Assassin is right about trying to do it yourself. Of course I did not really change anything just got rid of the typo's.
Vinson
Last edited on Dec 17, 2011 at 11:41am UTC
Dec 17, 2011 at 11:57am UTC
[co de] "Please use code tags"
[/co de]
¿How is the output incorrect?
Integer division returns an integer, so you may want to change (Quiz+Assign+Project)/3*.90
to (Quiz+Assign+Project)*.30