putchar('\n');
printf(" %d \n",n);
puts("-----");
printf(" %d",U);
を↓
printf("確率は%lf/%lfだぞ?るる",(double)n,(double)U);
の方がいい感じだよ(*´Д`*)ハァハァ