Skip to main content
Write a program to find the numbers and sum of all integers greater than 100 and less than 200 that are divisible by 7
Answer:
#include<stdio.h>
#include<conio.h>
void
main()
{
clrscr();
int i,sum=0;
for(i=100;i<200;i++)
{
if(i%7==0)
sum=sum+i;
}
printf("\nSum=%d",sum);
getch();
}
Output:
Sum: 2107