Advertisement
Guest User

Erreur Compilation

a guest
May 22nd, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdbool.h>
  3.  
  4. bool is_divisible_per_2(int n){
  5.     if(n % 2 == 0){
  6.         return true;
  7.     } else {
  8.         return false;
  9.     }
  10. }
  11.  
  12. int main(){
  13.  
  14.     int cpt = 0;
  15.     int i = 1;
  16.     while(cpt < 1000000){
  17.         if(is_divisible_per_2(i)){
  18.             printf("%d\n", i);
  19.             cpt++;
  20.         }
  21.         i++;
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement