fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int x, y;
  6.  
  7. puts("2つの整数を入力せよ。:");
  8. printf("整数x:\n"); scanf("%d", &x);
  9. printf("整数y:\n"); scanf("%d", &y);
  10.  
  11. printf("xの値はyの%d%です。\n", 100 * x / y);
  12.  
  13. return 0;
  14. }
  15.  
  16.  
Success #stdin #stdout 0.01s 5308KB
stdin
44
65
stdout
2つの整数を入力せよ。:
整数x:
整数y:
xの値はyの67%です。