Pages
News
Android
C
C ++
Java
Advanced Java
Cyber Security
HTML
CSS
Java Script
PHP
Tuesday, 30 June 2015
Program 3 : Write a program to find sum of all integers greater than 100 & less than 200 and are divisible by 5.
#include<stdio.h>
void main()
{
int i, sum = 0;
for (i = 101; i < 200; i++) {
if (i % 5 == 0) {
sum = sum + i;
}
}
printf("SUM is :%d", sum);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment