Sunday, 29 September 2013

how to keep decimals in c

how to keep decimals in c

I am writing simple code for homework. I get one number from user, which
is 3.4, when I define it with
scanf("%d",&a)
it takes only 3 and do it that way. I defined a as int a;
What should I do?

No comments:

Post a Comment