fork download
  1. #include <iostream.h>
  2. #include <stdlib.h>
  3. int main() {
  4. //intializing the two arrays
  5. string student_name[5];
  6. int score[5][3];
  7.  
  8. //taking input of names of students
  9. for(int i=0;i<5;i++)
  10. {
  11. cout<<"Enter the name of student number"<<i;
  12. gets(student_name[i]);
  13. }
  14.  
  15. //taking input for scores of students
  16. for(int i=0;i<5;i++)
  17. {
  18. cout<<"Enter scores of two quizes of"<<student_name[i];
  19. cin>>score[i][0]>>score[i][1];
  20. }
  21.  
  22. //assinging avg value to the third column
  23. for(int i=0;i<5;i++)
  24. {
  25. score[i][2] = (score[i][0] + score[i][1])/2;
  26. }
  27. return 0;
  28. }
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
n a b c d
2 3
4 5
6 7
8 9
1 2
compilation info
prog.c:1:22: fatal error: iostream.h: No such file or directory
 #include <iostream.h>
                      ^
compilation terminated.
stdout
Standard output is empty