Abdullah_A_lAsif_001

array 3

Jun 26th, 2019
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int i,array[10];
  5.     int sum=0;
  6.     for(i=0;i<=9;i=i+1)
  7.     {
  8.         scanf("%d",&array[i]);
  9.     }
  10.     for(i=9;i>=0;i--)
  11.     {
  12.         sum=sum+array[i];
  13.     }
  14.     printf("sum of the number: %d",sum);
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment