fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here 600851475143
  6. int kol, n, trn, del;
  7. trn=0;
  8. n=1;
  9. while(kol<=5)
  10. {
  11. trn=trn+n;
  12. kol=0;
  13. n=n+1;
  14. for(del=1,del<=trn,del=del+1)
  15. {
  16. if(trn%del==0)
  17. {
  18. kol=kol+1;
  19. }
  20. }
  21. }
  22. cout<<trn;
  23. return 0;
  24. }
Compilation error #stdin compilation error #stdout 0s 15232KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:14:30: error: expected ‘;’ before ‘)’ token
  for(del=1,del<=trn,del=del+1)
                              ^
prog.cpp:24:1: error: expected primary-expression at end of input
 }
 ^
prog.cpp:24:1: error: expected ‘;’ at end of input
prog.cpp:24:1: error: expected primary-expression at end of input
prog.cpp:24:1: error: expected ‘)’ at end of input
prog.cpp:24:1: error: expected statement at end of input
prog.cpp:24:1: error: expected ‘}’ at end of input
prog.cpp:24:1: error: expected ‘}’ at end of input
stdout
Standard output is empty