#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { double seed_money, target_money, annual_interest; printf("Input seed money : "); scanf("%lf", &seed_money); // double이라서 lf 사용!! printf("Input target money : "); scanf("%lf", &target_money); printf("Input annual interest (%%) : "); // % 기호 출력 %% scanf("%lf", &annual_interest); double fund = seed_money; int year_count = 0; while (fund < target_money); { //fund = fund + fund * annual_interest / 100.0; fund += fund * annual_interest / 100.0; //year_count = year_count + 1; //year_count += 1; year_count++; printf("Year %d, fund %f\n", year_count, fund); } printf("It takes %d years\n", year_count); return 0; }
이렇게 작성을 하였습니다. 세 가지(seed target annual)입력하고 나서 줄바뀜이 일어나고 아무런 것들도 출력이 일어나지 않는데 이건 무슨 현상일까요??
콘솔창에 타자를 쳐도 아무것도 안쳐지고, 타자를 치는 부분을 의미하는 하얀색 네모가 계속 껌뻑거리고만 있습니다...!