### NEED HELP

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.
 The program requires the user enter the number of students that we want to evaluate.

Can you do this bit?
yes i can......... but i am stuck with the loop .......i cant mke the program to do the loop ass many times as the user wants........for exsample:

i need to insert the number of students .... so the the loop will repeat the program from the begining as many numbers the users enters in the program
 i cant mke the program to do the loop ass many times as the user wants

Now that's a much better question. Here is how to loop x times, where x is the number of students.

 ``1234`` ``````for (int i=0; i
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;
`cin >> stevilo;`
Why do you overwrite the variable stevilo so many times?
so it can write me the grade
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;

//izračun s kateri dobimo uspešnost študenta

stevilo = (stevilo + stevilo1 + stevilo2 + stevilo3 + stevilo4 + stevilo5)/6;

if (stevilo >= 0 && stevilo < 10)
cout<<"ocena 1 , študent ni opravil izpita , uspešnost študenta " << stevilo<<" %"<<endl;
if (stevilo >= 10 && stevilo < 20)
cout<<"ocena 2 , študent ni opravil izpita , uspešnost študenta " << stevilo<<" %" <<endl;
if (stevilo >= 20 && stevilo < 30)
cout<<" ocena 3 , študent ni opravil izpita , uspešnost študenta " << stevilo <<" %"<<endl;
if (stevilo >= 30 && stevilo < 40)
cout<<"ocena 4 , študent ni opravil izpita , uspešnost študenta " << stevilo<<" %" <<endl;
if (stevilo >= 40 && stevilo < 50)
cout<<"ocena 5 , študent ni opravil izpita , uspešnost študenta " << stevilo <<" %"<<endl;
if (stevilo >= 50 && stevilo < 60)
cout<<"ocena 6 , študent je izpit opravil , uspešnost študenta " << stevilo<<" %" <<endl;
if (stevilo >= 60 && stevilo < 70)
cout<<"ocena 7 , študent je izpit opravil , uspešnost študenta " << stevilo <<" %"<<endl;
if (stevilo >= 70 && stevilo < 80)
cout<<"ocena 8 , študent je izpit opravil , uspešnost študenta " << stevilo <<" %"<<endl;
if (stevilo >= 80 && stevilo < 90)
cout<<"ocena 9 , študent je izpit opravil , uspešnost študenta " << stevilo<< "%" <<endl;
if (stevilo >= 90 && stevilo < 100)
cout<<"ocena 10 , študent je izpit opravil , uspešnost študenta " << stevilo <<" %"<<endl;

}

return 0;
}

Topic archived. No new replies allowed.