fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a[5]={1,5,8,7,2};
  6. int i,n,sum=0;
  7. for(i=0;i<5;i++){
  8. sum+=a[i];
  9. }
  10. printf ("%d",sum);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0.01s 5544KB
stdin
Standard input is empty
stdout
23