Write a C program to find the number of and sum of all integers greater than 50 and less than 300 that are divisible by 9
#include <stdio.h>
#include <conio.h>
main()
{
int i,sum=0;
clrscr();
for(i=51;i<300;i++)
{
if(i%9==0)
sum=sum+i;
}
printf("\n\nSum of these numbers is: %d",sum);
getch();
}
#include <conio.h>
main()
{
int i,sum=0;
clrscr();
for(i=51;i<300;i++)
{
if(i%9==0)
sum=sum+i;
}
printf("\n\nSum of these numbers is: %d",sum);
getch();
}