0

How to set up programme to make result in 2 decimals

#include <iostream> #include <string> #include <iomanip> using namespace std; int main() { Int a = 4; Int b = 7; Int c = 1.7; Int n = 75.5; Int P = a * b; Int Pn = P * n; Int Pnk = Pn * 1000; Int P1 = P * 10000; Int H = Pnk / P1; cout<<"Height is" << H; return 0; } This is pc version of code so it works but idk where and what to put so i get result in decimals

6th Jan 2019, 4:53 PM
Luka Racić
Luka Racić - avatar
3 Answers
0
Oh I'll try
6th Jan 2019, 5:09 PM
Luka Racić
Luka Racić - avatar
0
Do i change int main too?
6th Jan 2019, 5:10 PM
Luka Racić
Luka Racić - avatar
0
Works ❀
6th Jan 2019, 5:37 PM
Luka Racić
Luka Racić - avatar