fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int x,y;
  7.  
  8. cout <<"Podaj rok: " << endl;
  9. cin >> x;
  10.  
  11.  
  12. if (x==2014)
  13. {
  14. cout <<"Rok 2014 jest obecnie" << endl;
  15. }
  16. else if (x > 2014)
  17. {
  18. cout <<"Rok" << x << "nastapi za"<< y <<"lat" << endl;
  19. }
  20. else (x < 2014)
  21. {
  22. cout <<"Rok" << x << "byl" << y << "lat temu" << endl;
  23. }
  24. if (x == 0)
  25. {
  26. cout <<"Wprowadzone dane sa nieprawidlowe" << endl;
  27. }
  28. else (x < 0)
  29. {
  30. cout <<"Rok" << x << "p.n.e. byl" << y << "lat temu" << endl;
  31. }
  32. return 0;
  33. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2015
compilation info
prog.cpp: In function 'int main()':
prog.cpp:21:5: error: expected ';' before '{' token
     {
     ^
prog.cpp:29:5: error: expected ';' before '{' token
     {
     ^
stdout
Standard output is empty