-
정올 545 : 반복제어문2-자가진단5c/기초 2019. 1. 11. 14:11
My Solution
1234567891011121314151617#include<stdio.h>int main(void){int num=0, count=1, three_m=0, five_m=0;while(count<=10){scanf("%d",&num);if(num%3==0){three_m++;}if(num%5==0){five_m++;}count++;}printf("Multiples of 3 : %d\n",three_m);printf("Multiples of 5 : %d",five_m);return 0;}cs 반응형'c > 기초' 카테고리의 다른 글
정올 547 : 반복제어문2-자가진단7 (0) 2019.01.11 정올 546 : 반복제어문2-자가진단6 (0) 2019.01.11 정올 544 : 반복제어문2-자가진단4 (0) 2019.01.11 정올 543 : 반복제어문2-자가진단3 (0) 2019.01.11 정올 542 : 반복제어문2-자가진단2 (0) 2019.01.11