fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x = 3,
  5. y = -4;
  6.  
  7. char ch_eq = '=',
  8. ch_plus = '+',
  9. ch_minus = '-',
  10. ch_div = '/',
  11. ch_mul = '*';
  12.  
  13. double res = -0.75;
  14. printf("Result of %c for %d %d = %5.2f", ch_div, x, y, res);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
Result of / for 3 -4 = -0.75