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 型変数 nの値:%d\n", n);
  9. printf(" n / 2:%d\n", n / 2);
  10.  
  11. printf("double型変数 xの値:%f\n", x);
  12. printf(" x/2.0:%f\n", x / 2);
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
int 型変数 nの値:9
                        n / 2:4
double型変数 xの値:9.990000
                        x/2.0:4.995000