Tuesday, February 10, 2015

Sum of numbers between 100 and 200 divisible by 7

#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("Sum of all no between 100 and 200 "); printf("which is divisible by 7 is :: %d",sum); getch(); }

Share

& Comment

0 comments:

Post a Comment

 

Copyright © 2015 Code Fervor™ is a registered trademark.

Designed by Templateism By Naman Kumar