fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int num1, num2, sum;
  5.  
  6. // รับค่าจากผู้ใช้
  7. printf("Enter first number: ");
  8. scanf("%d", &num1);
  9.  
  10. printf("Enter second number: ");
  11. scanf("%d", &num2);
  12.  
  13. // คำนวณผลบวก
  14. sum = num1 + num2;
  15.  
  16. // แสดงผลลัพธ์
  17. printf("The sum of %d and %d is %d\n", num1, num2, sum);
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
Enter first number: Enter second number: The sum of 799893648 and 32767 is 799926415