Advertisement

Output: The numbers which are 100<x<200 & divided by 7, sum of that numbers & output of that numbers.


#include<stdio.h>
#include<conio.h>
void main()
{   clrscr();
    int n=0,i;
    for(i=100;i<=200;i++)
    if(i%7==0)
    {  printf(" %d",i);
       n=n+i;        }

    printf("\n sum=%d",n);
    getch();
}

No comments:

Post a Comment

Please comment bellow. Share your knowledge