+1

Can someone help me, to understanding what missing in this code

Solve problem about ceilling https://code.sololearn.com/cQK15MSUPoWI/?ref=app

1/16/2020 4:38:39 AM

Guntur Darmawan

3 Answers

New Answer

+1

cout << ceil(x) << endl; no need for setprecision but you have to uncomment <cmath>

+2

Guntur Darmawan You have not commented your above declared main function and header files correctly. Also you have declared the variable and logic multiple times which giving multiple declaration of same variables as an error Try this way. #include <iostream> //#include <cmath> #include <iomanip> using namespace std; int main(){ float x, home; cin >> home; //your code goes here x =(2 / home)*100; cout <<setprecision(2)<< x << endl; return 0; }

+1

Thanks thats is work:)