fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int n = 9.99;
  6. double x = 9.99;
  7.  
  8. printf("intの型変数:%d\n", n);
  9. printf(" n / 2:%d\n", n / 2);
  10.  
  11. printf("doubleの型変数:%f\n", x);
  12. printf(" n / 2:%f\n", x / 2);
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
intの型変数:9
      n / 2:4
doubleの型変数:9.990000
      n / 2:4.995000