fork download
  1. #include <stdio.h>
  2. // c code
  3.  
  4. // Write Pseudocode statements to Declare 4 Integers. You can decide on the variables names of each of the integers.
  5.  
  6. // 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..
  7.  
  8. // 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.
  9.  
  10. // Be sure to include all of your pseudocode, all of your C code and the output of running your C code.
  11.  
  12. int main() {
  13. int num1;
  14. int num2;
  15. int num3;
  16. int sum;
  17.  
  18. num1 = 23;
  19. num2 = 3;
  20. num3 = 26;
  21.  
  22. sum = num1 + num2 + num3;
  23.  
  24. printf("The sum is 52");
  25. //printf(sum);
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 5436KB
stdin
Integer j, m

Set m = 1

Integer a[4] = {1, 1, 2, 2}

a[0] = a[0] + a[1]

a[1] = a[1] + a[2]

a[2] = a[2] + a[3]

a[3] a[3] + a[0] =

m = a[3]

Print m
stdout
The sum is 52