Anik_Akash

Even Odd

Nov 18th, 2020
442
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.     int i,n,ans, a=0;
  6.     printf("Enter a number: \n");
  7.     scanf("%d",&n);
  8.  
  9.     printf("Start: \n");
  10.  
  11.     for(i=1; i<=n; i++){
  12.         if(i%2==0) printf("%d Is Even\n", i);
  13.         else printf("%d is Odd Number\n",i);
  14.         a++;
  15.     }
  16.     printf("%d\n",a);
  17.  
  18.     return 0;
  19. }
RAW Paste Data