[ create a new paste ] login | about

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

C, pasted on Dec 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int main()
    {
    char i[8];
    int a, b, c;
flag:
    printf("2桁の値を入力してください:");
    scanf("%s",i);
    a = strlen(i);

    if(a < 3)
	{
	b = i[0] - 48;
	c = i[1] - 48;
	printf("計算結果は%dです。",b*c);
	}
    else
	goto flag;

    return 0;
    }


Create a new paste based on this one


Comments: