C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
/*
do not use float as loop counter
in this example value 1.000 is printed !!!
(but the condition was "d < 1.0")
and where '\n' after "=1.000000" ?
*/
void func_float()
{
double d;
for(d = 0.0; d < 1.0; d += 0.1)
{
printf("d = %f\n", d);
}
}
void func_int()
{
int d;
for(d = 0; d < 10; d += 1)
{
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run