You are on page 1of 1

#include<stdio.

h>
#include<conio.h>

int main()
{
int num, sum=0;
clrscr();

printf("Input 0 for the sum \n");


for(;;){
printf("Enter a number : ");
scanf("%d",&num);
if(num==0) break;
sum=sum+num;
}

printf("The sum of all te entered numbers is : %d ",sum);

getch();
return 0;

You might also like