hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* WRITE A PROGRAM TO FIND SUM OF ALL INTEGERS GREATER THAN 100 & LESS THAN 200 AND ARE DIVISIBLE BY 5 */
#include<stdio.h>
#include<conio.h>
void main()
{
int i=101, sum=0;
while(i<200)
{
if(i%5==0)
{
// printf("%d\n",i);
sum = sum + i;
} // if close
i++;
}
printf("\nfinal ans is : %d",sum);
getch();
}
/* OUTPUT */
==========================
final ans is : 2850
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment