fork download
  1. // C Code
  2.  
  3. // Write Pseudocode statements to Declare 4 Integers. You can decide on the variables names of each of the integers.
  4.  
  5. // Then, still using Pseudocode, set the values for 3 of the integers to valid integer values of your choice. In pseudocode, set the value of the 4th integer to the sum of the other 3 integers. Finally, print the output of the summed integers.
  6.  
  7. // Next, take your pseudocode and convert it to C code and demonstrate it runs properly in an online C compiler such as ideone.com or codetwist.com.
  8.  
  9. // Be sure to include all of your pseudocode, all of your C code and the output of running your C code.
  10.  
  11. #include <stdio.h>
  12. int main()
  13.  
  14. {
  15.  
  16. int num1;
  17. int num2;
  18. int num3;
  19. int sum;
  20.  
  21. num1 = 31;
  22. num2 = 43;
  23. num3 = 1971;
  24.  
  25. sum = num1 + num2 + num3;
  26.  
  27. printf("The sum is 2045");
  28. //printf(sum);
  29.  
  30. return 0;
  31. }
Success #stdin #stdout 0s 5408KB
stdin
Standard input is empty
stdout
The sum is 2045