Question #219842

Declare an array to store the marks of 100 students and then write the code to input

data into the array.


Expert's answer

#include <iostream>


using namespace std;


int main()
{
    int marks[100];
    cout<<"Enter marks of 100 students\n";
    
    for(int i=0;i<100;i++){
        cout<<"Enter marks for student "<<i+1<<": ";
        cin>>marks[i];
    }


    return 0;
}

LATEST TUTORIALS
APPROVED BY CLIENTS