Answer to Question #29199 in C++ for ashaba emmanuel
2013-04-26T08:43:34-04:00
Write a c++ program that can be used to store and display marks of 80 students in a class
1
2013-04-26T11:49:21-0400
#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 !
Learn more about our help with Assignments:
C++
Comments
Leave a comment