fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. main()
  4. {
  5. int arr[5],i,sum=0;
  6. printf(" Enter Five numbers : ");
  7. for(i=0;i<5;i++)
  8. {
  9. scanf("%d",&arr[i]);
  10. }
  11. for(i=0;i<5;i++)
  12. {
  13. sum=sum+arr[i];
  14. }
  15. printf("\n The sum of the given 5 numbers is : %d\n",sum);
  16. system("pause");
  17. }
Success #stdin #stdout #stderr 0.01s 5284KB
stdin
1
2
3
4
5
stdout
      Enter Five numbers : 
      The sum of the given 5 numbers is : 15
stderr
sh: 1: pause: not found