find number & sum of all integer greater than 100 and less than 200 that are divisible by 7 using C

/*WAP to find number & sum of all integer greater than 100 and less than 200 that are divisible by 7*/
#include<stdio.h>
void main()
{
int i,count=0,sum=0;
clrscr();
for(i=100;i<=200;i++)
if(i%7==0)
{
count=count+1;
sum=sum+i;
}
printf("Numbers are Divisible by 7 =%d\n",count);
printf("Sum of all Integer =%d",sum);
getch();
}

Output

Numbers are Divisible by 7 =14
Sum of all Integer =2107

Download Program

Download