fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main ()
  6. {
  7. int double test1, test2, test3, test4, test5, total;
  8.  
  9.  
  10. cout<< "What is your score for 1:";
  11. Cin >> test1 >> endl;
  12.  
  13. cout<< "What is your score for 2:";
  14. Cin >> test2 >> endl;
  15.  
  16. cout<< "What is your score for 3:";
  17. cin >> test3 >> endl;
  18.  
  19. cout<< "What is your score for 4:";
  20. cin >> test4 >> endl;
  21.  
  22. cout<< "What is your score for 5:";
  23. cin >> test5 >> endl;
  24.  
  25. total = (test1 + test2 + test3 + test4 + test5) / 3;
  26.  
  27. cout<< std::setpercision(1) << total << endl;
  28.  
  29. return 0;
  30.  
  31. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:7:13: error: two or more data types in declaration of 'test1'
  int double test1, test2, test3, test4, test5, total;
             ^
prog.cpp:7:20: error: two or more data types in declaration of 'test2'
  int double test1, test2, test3, test4, test5, total;
                    ^
prog.cpp:7:27: error: two or more data types in declaration of 'test3'
  int double test1, test2, test3, test4, test5, total;
                           ^
prog.cpp:7:34: error: two or more data types in declaration of 'test4'
  int double test1, test2, test3, test4, test5, total;
                                  ^
prog.cpp:7:41: error: two or more data types in declaration of 'test5'
  int double test1, test2, test3, test4, test5, total;
                                         ^
prog.cpp:7:48: error: two or more data types in declaration of 'total'
  int double test1, test2, test3, test4, test5, total;
                                                ^
prog.cpp:11:1: error: 'Cin' was not declared in this scope
 Cin >> test1 >> endl;
 ^
prog.cpp:11:8: error: 'test1' was not declared in this scope
 Cin >> test1 >> endl;
        ^
prog.cpp:14:8: error: 'test2' was not declared in this scope
 Cin >> test2 >> endl;
        ^
prog.cpp:17:8: error: 'test3' was not declared in this scope
 cin >> test3 >> endl;
        ^
prog.cpp:20:8: error: 'test4' was not declared in this scope
 cin >> test4 >> endl;
        ^
prog.cpp:23:8: error: 'test5' was not declared in this scope
 cin >> test5 >> endl;
        ^
prog.cpp:25:1: error: 'total' was not declared in this scope
 total = (test1 + test2 + test3 + test4 + test5) / 3; 
 ^
prog.cpp:27:8: error: 'setpercision' is not a member of 'std'
 cout<< std::setpercision(1) << total << endl;
        ^
stdout
Standard output is empty