사칙연산 프로그램 만들어보고 있는데 나눗셈에서 프로그램이 이상해져요.
- case 4: while (c<=10){
- srand((int)time(NULL));
- d=rand()%a*10+1;
- Sleep(300);
- srand((int)time(NULL));
- e=rand()%a+1;
- while (d%e==0){
- srand((int)time(NULL));
- d=rand()%a*10+1;
- Sleep(300);
- srand((int)time(NULL));
- e=rand()%a+1;};
- printf("%d. %d/%d= ",c,d,e);
- scanf("%d",&f);
- if (f==d/e){
- printf("정답입니다. ");
- g+=10;
- }
- else {
- printf("틀렸습니다. ");
- }
- c++;
스캔애프%d햇잔혀
ㄳㄳ