fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. int result1 = 5 + 7 * 2 - 6;
  5. float result2 = 2 * 5 / 2 + 5 / 2.0;
  6. float result3 = 25 / 4.0 - 2 * 3.0;
  7. int result4 = 56 % 6;
  8.  
  9. printf("ข้อ 1 %d\n", result1);
  10. printf("ข้อ 2 %.2f\n", result2);
  11. printf("ข้อ 3 %.2f\n", result3);
  12. printf("ข้อ 4 %d\n", result4);
  13.  
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
ข้อ 1 13
ข้อ 2 7.50
ข้อ 3 0.25
ข้อ 4 2