hello friends....
TAKE THE FIRST STEP TO KNOWLEDGE FRIENDS BECAUSE KNOWLEDGE IS FREE.
>> /* WRITE A C PROGRAM TO MAKE SUM OF 10 NUMBERS USING ARRAY */
#include<stdio.h> #include<conio.h> void main() { int A[10],i,sum=0; clrscr();
/* store the value in variable*/
printf("enter your value :\n"); for(i=1; i<=10; i++){ scanf("%d",&A[i]); }
/* sum of 10 values */
for(i=1; i<=10; i++){
sum = sum + A[i];
}
printf("sum of ten number: %d\n",sum);
getch();
}
/* OUTPUT */
========================
enter your value :
10
20
30
40
50
60
70
80
90
100
sum of number : 550
* * * * * * * * * * * * * *http://www.dnpdeveloper.com
if you have like this blog so share and subscribe, comment for this blog.
if your any question, so comment pleass.
MY INSTAGRAM ID : dnp176
Comments
Post a Comment