fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int num1, num2, sum;
  5.  
  6. // Prompt user for input
  7. printf("Enter two integers: ");
  8. scanf("%d %d", &num1, &num2);
  9.  
  10. // Calculate the sum
  11. sum = num1 + num2;
  12.  
  13. // Display the result
  14. printf("Sum: %d + %d = %d\n", num1, num2, sum);
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5336KB
stdin
Standard input is empty
stdout
Enter two integers: Sum: 143264448 + 32765 = 143297213