#include <stdio.h>
int main ( void )
{
float principal;
float rate;
int days;
float interest;
printf( "Enter loan principal(-1 to end):" );
scanf( "%f", &principal );
printf( "Enter Interest rate: " );
scanf( "%f", &rate );
printf( "Enter term of the loan In days:" );
scanf( "%f", &days);
interest = principal * rate * days / 365;
printf( "The Interest charge Is $%f\n", interest );
return 0;
}
이러고 출력하면 interest charge 부분에 100이 나와야하는데
왜 저는 어마어마한 수가 나와버리는걸까요..ㅜ
알려주시면 감사하겠습니다.
존나 무섭네 아까 숙제 해결되자마자 바로 글삭 ㄷㄷ해...
요기에 자꾸 물어보지말고 툴에 있는 디버깅모드 이용해서 하나하나 살피는게 도움될듯
직접 데이터 이동하는거 보면서
C호구라서 디버깅이뭔지몰라요...
나 잘나오는뎅