Skip to main content

write a C program to find sum of all integer which is > 100 and < 200 and which is divisible by 7


#include<stdio.h>
#include<conio.h>

main()
{
    int i,sum = 0;
    
    for(i = 100;i <= 200 ; i++)
    {
        if (i % 7== 0)
        {
            sum = sum + i;
        }
    }
    
    printf("Sum of all no between 100 and 200 \n");
    printf("which is divisible by 9 is :: %d",sum);

    getch();
}