i need to do this program and i am stuck .....so if someone who knows how to do it plz take 5 minutes and help me , i would be really grateful for u help .
PROGRAM:
Write a program that will allow the evaluation of students. The program requires the user enter the number of students that we want to evaluate. For each student the user enters the effectiveness of student assignments, homework assignments, progress tests and three mid-term exams (for each) in the subject Programming I. Based on the obtained performance program calculates whether the student passed the exam with the help of ongoing work. If the exam is completed, the program displays student performance and assessment by the student reached.
here is the program can u plz make me this part .... of it .....:
Based on the obtained performance program calculates whether the student passed the exam with the help of ongoing work. If the exam is completed, the program displays student performance and assessment by the student reached.
#include <iostream>
using namespace std;
int main()
{
int stevilo;
int x;
cout <<"vnesi število študentov"<<endl;
cin >> x;
for (int i=0; i<x; i++)
{
cout<<"vnesi število doseženih točk pri vajah:"<<endl;
cin >> stevilo;
cout<<"vnesi število doseženih točk pri domačih nalogah"<<endl;
cin >> stevilo;
cout<<"Vnesi število doseženih točk pri izpitih"<<endl;
cin >> stevilo;
cout<<"Vnesi število doseženih točk pri prvem vmesnem izpitu"<<endl;
cin >> stevilo;
cout<<"Vnesi število doseženih točk pri drugem vmesnem izpitu"<<endl;
cin >> stevilo;
cout<<"Vnesi število doseženih točk pri tretjem vmesnem izpitu"<<endl;
cin >> stevilo;
if (stevilo < 50)
cout<<"5 ni opravil izpita"<<endl;
if (stevilo >= 50 && stevilo < 60)
cout<<"6 izpit je opravil"<<endl;
if (stevilo >= 60 && stevilo < 70)
cout<<"7 izpit je opravil"<<endl;
if (stevilo >= 70 && stevilo < 80)
cout<<"8 izpit je pravil"<<endl;
if (stevilo >= 80 && stevilo < 90)
cout<<"9 izpit je opravil"<<endl;
if (stevilo >= 90 && stevilo < 100)
cout<<"10 izpit je opravil"<<endl;
}
return 0;
Do you understand that when you do this many times cin >> stevilo; each time it overwrites what was put into stevilo last time? You are doing this cin >> stevilo; six times but only the last time matters.
i fixed it ........ here is the resoult , try it and tell me if i can fix something:
#include <iostream>
using namespace std;
int main()
{
int stevilo;
int stevilo1;
int stevilo2;
int stevilo3;
int stevilo4;
int stevilo5;
int x;
cout<<"PROGRAMIRANJE 1"<<endl;
cout <<"vnesi število študentov:"<<endl;
cin >> x;
//proces ki program ponavlja glede na število vpisanih študentov
for (int i=0; i<x; i++)
{
//vnos števil za ocenitev študenta
cout<<"vnesi število doseženih točk pri vajah : "<<endl;
cin >> stevilo;
cout<<"vnesi število doseženih točk pri domačih nalogah:"<<endl;
cin >> stevilo1;
cout<<"Vnesi število doseženih točk pri sprotnem preverjanju:"<<endl;
cin >> stevilo2;
cout<<"Vnesi število doseženih točk pri prvem vmesnem izpitu:"<<endl;
cin >> stevilo3;
cout<<"Vnesi število doseženih točk pri drugem vmesnem izpitu:"<<endl;
cin >> stevilo4;
cout<<"Vnesi število doseženih točk pri tretjem vmesnem izpitu:"<<endl;
cin >> stevilo5;