Thursday 5 September 2019

loops - How '

#include

int main()
{
float x=0;
while(x<=.2)
{
printf("%f\n",x);
x=x+0.2;
}
return 0;
}



The output is



0.000000


But it should give..



0.000000

0.200000


I am posting question on stackoverflow for the first time. Please forgive me for my silliness.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...