Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<stdbool.h>
- bool is_divisible_per_2(int n){
- if(n % 2 == 0){
- return true;
- } else {
- return false;
- }
- }
- int main(){
- int cpt = 0;
- int i = 1;
- while(cpt < 1000000){
- if(is_divisible_per_2(i)){
- printf("%d\n", i);
- cpt++;
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement