Advertisement
whitesurge

First C which is broken

Aug 30th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3. Online C Compiler.
  4. Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11. int main()
  12. {
  13. int a = 0;
  14. int b = 0;
  15. int c = 0;
  16. int d = 0;
  17. int e = 0;
  18.  
  19.  
  20. printf("Enter the 1st number ");
  21. scanf("%d /n", &a);
  22.  
  23. printf("Enter the 2nd number ");
  24. scanf("%d /n", &b);
  25.  
  26. printf("Enter the 3rd number ");
  27. scanf("%d /n", &c);
  28.  
  29. printf("Enter the 4th number ");
  30. scanf("%d /n", &d);
  31.  
  32. printf("Enter the 5th number ");
  33. scanf("%d /n", &e);
  34.  
  35. int res = a + b + c + d + e;
  36. printf("The sum of all the numbers is %d", res);
  37. return 0;
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement