C/C++の宿題片付けます 131代目at TECH
C/C++の宿題片付けます 131代目 - 暇つぶし2ch429:デフォルトの名無しさん
09/10/28 02:14:23
>>422
/* 課題3 */
#include <stdio.h>
int main() {
int n, i;
printf("整数を入力 > ");
scanf("%d", &n);
i = 0;
while (n > 0) {
if ((n % 3 == 0) || (n % 5 == 0))
i++;
n--;
}
printf("3か5の倍数の個数 = %d\n", i);
return 0;
}



次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch