62 570
Assignments Done
99%
Successfully Done
In June 2018

Answer to Question #29199 in C++ for ashaba emmanuel

Question #29199
Write a c++ program that can be used to store and display marks of 80 students in a class
Expert's answer
#include <conio.h>
#include <iostream>


using namespace std;
//main function
int main()
{
int marks[80];//declare variable for marks

//fill random marks
for(int i=0;i<80;i++){
if(i%2==0){
marks[i]=80; //set 80
}
if(i%3==0){
marks[i]=50; //set 50
}
if(i%4==0){
marks[i]=65; //set 65
}else{
marks[i]=74;//set 74
}
}
//show result
for(int i=0;i<80;i++){
cout<<"Student "<<(i+1)<<" mark is
:"<<marks[i]<<"
";
}
getch();//delay
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions