#include<stdio.h>
#include<conio.h>
void main()
{
int sum, n, num;
printf("How many numbers");
scanf("%d",&n);
for(sum = 0; n > 0; n--)
{
printf("Enter a number: ");
scanf("%d",&num);
sum += num;
}
printf("Sum = %d",sum);
}
Copyright © 2010 C Programs
Icons & Wordpress Theme by N.Design | Blogger Templates by Blog and Web
0 comments: (+add yours?)
Post a Comment