xachetbay

Đếm số lượng số chia hết cho 3 hoặc 7 trong khoảng 1 đến 100

Mar 13th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.19 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n,i;
  5.     printf("Cac so nguyen chia het cho 3 hoac 7: \n");
  6.     for(i = 0; i <= 100;i++){
  7.         if (i % 3 == 0 || i % 7 == 0 ){
  8.             printf("%d \t",i);
  9.         }
  10.     }
  11.    
  12. }
Add Comment
Please, Sign In to add comment