asz304
- 107
- 0
I'm not sure how this works. If I need to put a loop before the first cout statement.
Is this right?
or should there be a loop before the first cout statement that holds till the third cin statement?
The Attempt at a Solution
Code:
include <iostream>
include <cmath>
using namespace std;
string name[number];
char letterGrade[number];
double mark[number];
int main(){
string name[number];
char letterGrade[number];
double mark[number];
cout <<"Enter number of students";
cin >> number;
cout << " Enter the name ";
cin >> name[number];
cout << " Enter the mark ";
cin >> mark[number];
Is this right?
or should there be a loop before the first cout statement that holds till the third cin statement?