[ create a new paste ] login | about

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

jht90hou - C, pasted on Aug 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
include <stdio.h>
/*摄氏温度与华氏温度的转换程序*/
main()
{
    int celsius, fahr;
    int lower, upper, step;

    lower = 0;//温度表的下限
    upper = 30;//温度表的上限
    step = 1;//步长

    celsius = lower;
    while(celsius <= upper)
    {
        fahr = celsius*9 / 5 + 32;
        printf("%d\t%d\n", celsius, fahr);
        celsius = celsius + step;
    }
}


Output:
1
2
3
4
Line 1: error: stray '\357' in program
Line 1: error: stray '\274' in program
Line 1: error: stray '\203' in program
Line 1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token


Create a new paste based on this one


Comments: