C/C++の宿題を片付けます 111代目
at TECH
588:デフォルトの名無しさん
08/07/03 05:27:15
>>585
#include <stdio.h>
int remain(int a, int b)
{
return a >= b ? remain(a-b, b) : a;
}
int main(void)
{
int a, b;
scanf("%d", &a);
scanf("%d", &b);
printf("%dを%dで割った余りは%d\n", a, b, remain(a, b));
return 0;
}
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5405日前に更新/196 KB
担当:undef