fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. float min=oceny[0];
  5. int main() {
  6.  
  7. for(int i=0;i<5;i++)
  8. {
  9. cout<<"podaj ocene:"<<endl;
  10. cin>>oceny[i];
  11. suma+=oceny[i];
  12. if min>oceny[i]
  13. {
  14. min=oceny[i]
  15. }
  16. }
  17. srednia=suma/5;
  18. cout<<"średnia= "<<srednia<<endl;
  19.  
  20. return 0;
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:11: error: ‘oceny’ was not declared in this scope
 float min=oceny[0];
           ^~~~~
prog.cpp: In function ‘int main()’:
prog.cpp:10:8: error: ‘oceny’ was not declared in this scope
   cin>>oceny[i];
        ^~~~~
prog.cpp:11:3: error: ‘suma’ was not declared in this scope
   suma+=oceny[i];
   ^~~~
prog.cpp:12:6: error: expected ‘(’ before ‘min’
   if min>oceny[i]
      ^~~
prog.cpp:17:2: error: ‘srednia’ was not declared in this scope
  srednia=suma/5;
  ^~~~~~~
prog.cpp:17:10: error: ‘suma’ was not declared in this scope
  srednia=suma/5;
          ^~~~
stdout
Standard output is empty