#include <iostream>using namespace std; int main() { float p; float h; float a; cin>>a; cin>>h; p=(a*h)*2 cout<<p; if (p<200); {cout<<"liczba ujemna";} else; if(p>200); {cout<<"liczba dodatnia";} // your code goes here return 0;}
a=5 h=10
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; ^~~~
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!