[ create a new paste ] login | about

Link: http://codepad.org/3bcYIz0J    [ raw code | output | fork ]

C, pasted on Feb 5:
1
2
3
4
5
6
7
8
int main() {
    float p;
    for (p = 0; p < 5; p += 0.5)
    {
        printf("p=%2.2f\n",p);
    }
    return 0;
}


Output:
1
2
3
4
5
6
7
8
9
10
p=0.00
p=0.50
p=1.00
p=1.50
p=2.00
p=2.50
p=3.00
p=3.50
p=4.00
p=4.50


Create a new paste based on this one


Comments: