computing-fundamentals
C programs and question bank.
Friday, October 29, 2010
c programs-sum of digit
#include
#include
void main()
{
int a[10];
int sum=0;
scanf("d",&n);
for(int i=0;i
{scanf("%d",&s[i]);
}
for(i=0;i
{
sum=sum+a[i];
}
printf("%d",sum);
getch();
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment