|
From: Nicolas G. <nic...@in...> - 2003-03-20 15:45:20
|
Peurhaps you can try:
a=16/3.0;
because I think but i'm not sure that the fact to do 16/3 returns an
(int) because of 3
On Thu, 20 Mar 2003, francesca wrote:
> Hi,
> I use Dev-C++ 9.7.0 OS Win 2000.
> When I write simply:
>
> #include <iostream>
> #include <stdio.h>
> #include <stdlib.h>
> using namespace std;
>
> main()
> {
> float a;
> a=16/3;
> cout<<a<<endl;
> system("PAUSE");
> return 0;
> }
>
> the compilation finishes correctly, but the program visualizes only 5 without decimates them!
> why?
>
> Any help is appreciated
>
> francesca
>
|