fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int x;
  7. cout << "Enter how many student ..? ";
  8. cin >> x;
  9. const int size = x;
  10. int g[size];
  11. cout << "enter " << size << "your ";
  12. for (int i = 0; i < size; i++){
  13. cin >> g[i];
  14. }
  15. for (int i = 0; i < size; i++){
  16. cout << "student" << i + 1 << "grade is : " << g[i] << endl;
  17. }
  18.  
  19. system("pause");
  20. return 0 ;
  21. }
Success #stdin #stdout #stderr 0s 3344KB
stdin
4
100
97
48
98
stdout
Enter how many student ..?  enter 4your student1grade is : 100
student2grade is : 97
student3grade is : 48
student4grade is : 98
stderr
sh: pause: not found