Advertisement
Md_hosen_zisad

4&6divide8ntd

Aug 16th, 2017
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1.  
  2. #include<stdio.h>
  3. int main()
  4. {
  5.  
  6.     int i,sum=0,n;
  7.     scanf("%d",&n);
  8.     for (i=1;i<=n;i++)
  9.     {
  10.         if( i%8!=0 && i%4==0 && i%6==0)
  11.  
  12.       {
  13.           sum=sum+i;}
  14.  
  15.     }
  16.     printf("sum of odd number== %d",sum);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement