fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. const int size=6;
  6. double sale[size];
  7. double total=0;
  8. cout<<'sale";
  9. for(int j=0;j<6;j++)
  10. {
  11. cin>>sale[j];
  12. otal+=sale[j];
  13. double avg=total/size;
  14. }
  15. cout<<"a"<<avg<<endl;
  16.  
  17. // your code goes here
  18. return 0;
  19. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
3.11
2.2
3.2
2.2
3.22
2.0
compilation info
prog.cpp:8:7: warning: missing terminating ' character
 cout<<'sale";
       ^
prog.cpp:8:7: error: missing terminating ' character
 cout<<'sale";
       ^~~~~~~
prog.cpp: In function ‘int main()’:
prog.cpp:9:1: error: expected primary-expression before ‘for’
 for(int j=0;j<6;j++)
 ^~~
prog.cpp:9:13: error: ‘j’ was not declared in this scope
 for(int j=0;j<6;j++)
             ^
prog.cpp:15:12: error: ‘avg’ was not declared in this scope
 cout<<"a"<<avg<<endl;
            ^~~
stdout
Standard output is empty