fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float p;
  6. float h;
  7. float a;
  8. cin>>a;
  9. cin>>h;
  10. p=(a*h)*2
  11. cout<<p;
  12. if (p<200);
  13. {cout<<"liczba ujemna";}
  14. else;
  15. if(p>200);
  16. {cout<<"liczba dodatnia";}
  17.  
  18. // your code goes here
  19. return 0;
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
a=5
h=10
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:10:11: error: expected ‘;’ before ‘cout’
  p=(a*h)*2
           ^
           ;
  cout<<p;
  ~~~~      
prog.cpp:14:2: error: ‘else’ without a previous ‘if’
  else;
  ^~~~
stdout
Standard output is empty