0

Decimal point

#include <iostream> typedef unsigned short int USHORT; int main() { using namespace std; USHORT PI = 3,14; USHORT Podstava = 12; USHORT Vyska = 25; USHORT Povrch = (2*3,14*12*(25+12)); cout << "Povrch: " << Povrch << endl; and question is: How i can get decimal number from this? what i must change? thx for answer

3rd Nov 2016, 4:06 PM
P3RS0N
P3RS0N - avatar
2 Respuestas
+ 1
For floating number you have to use float or double instead of integer
3rd Nov 2016, 7:41 PM
Kabe
0
ok i got it thx
3rd Nov 2016, 8:16 PM
P3RS0N
P3RS0N - avatar