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
3 Answers
0
Oh I'll try
0
Do i change int main too?
0
Works â€ïž