Write a program to find sum of 10 to 20 numbers.

Write a program to find sum of 10 to 20 numbers.

#include<stdio.h>

#include<conio.h>

void main()

{

clrscr();

int  i, sum=0;

for(i=10; i<=20;i++)

{

sum=sum+i;

}

printf(“%d”,sum);

getch();

}

 

 

Output:

 

165


Comments