+ 1
how can i print 19.5
hi please help me, when i want to print 19.5, on the screen, it just show me 19 or when i want to print 18.25, on the screen, it just show me 18 my code is : #include <iostream> using namespace std; int main() { int number; cout<<"enter your number\n"; cin>>number; cout<<number; return 0; } please tell me what to do thanks
2 Answers
+ 2
use float in place of int
0
thanks a lot