C Programming Blog

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

void main()
{
    int i,sum = 0;
    clrscr();

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


/*
    **********
    OUTPUT
    **********

     Sum of all no between 100 and 200 which is divisible by 7 is :: 2107
*/