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 0.01s 5332KB
stdin
INPUT a #The largest of two numbers
INPUT b #The smallest of two numbers
WHILE b > 0
   temp = b
   b = a MOD b
   a = temp
END WHILE
OUTPUT a
stdout
The sum is 52