Professional Documents
Culture Documents
Main - CPP
Main - CPP
cpp
#include <iostream>
#include <string>
using namespace std;
main.cpp 1
int main(){
B:
const int x = 6, y = 5,MAX_NUM=1000;
int totalNumOfStudents = 0, largestBlock = 0, smallestBlock = 0,
largestBatch = 0, smallestBatch = -1, eachBatch[y]={0,0,0,0,0}, z = 0, menu;
char noSecondYearBlock, largestBlockIs, smallestBlockIs;
string studentData[MAX_NUM][4],largestBatchIs, smallestBatchIs, outputText[4]={"name","age","gender","ID"};
int blocks[x][y];
//data to be inserted{{10, 25, 30, 11, 12},{0, 23, 9, 10, 11},{7, 44, 77, 0, 8},{8, 3, 0, 8, 12},{11, 20, 4, 11, 0},{0, 0, 10, 20, 3
for (int i = 0; i < x; i++){
for (int j = 0; j < y; j++){
cout<<"Enter The number of "<<studentYear(j)<<" year students in Block "<<studentBlock(i)<<": ";
cin>>blocks[i][j];
}
cout<<"\n";
}
cout<<"done\n\n";
main.cpp 2
}
goto A;
return 0;
}
main.cpp 3