Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  sum
Language: C/C++
Code:
#include<stdio.h>
#include<conio.h>
int main()
{
     int a[30],s,i,n;
     s=0;
     printf("n");
     printf("enter no of digits");
     scanf("%d",&n);
     for(i=0;i<n;i++)
     {
       scanf("%d",&a[i]);
       s+=a[i];
     }
     printf("%d\n",s);
   
     getch();
     return 0;
   
}


          
          
          
          
          
Comments: