fork download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main(void) {
  5. char x[17];
  6. puts("実数を入力せよ:");
  7. printf("x=");
  8. scanf("%16s%*[^\n]", x);
  9. printf("入力した価は%lfです\n", strtod(x, NULL));
  10. return EXIT_SUCCESS;
  11. }
  12.  
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
実数を入力せよ:
x=入力した価は0.000000です