Write a c program to find sum of that numbers which are dividable by 3 between 100 and 300
#include<stdio.h>
#include<conio.h>
void main()
{
int no=100,sum=0;
clrscr();
while(no>=100&&no<=300)
{
if(no%3==0){sum=sum+no;}
no++;
}
printf("no divided by 3 beatween 100 & 300 : %d",sum);
getch();
}
thank you for visiting seeya again
No comments:
Post a Comment