Hey again guys,

I'm still learning here so bear with me. I'm trying to start this lightweight payment calculator, but it's giving me a problem when I enter data. After I scanf to principal, term and rate, if I printf to check the new values, the first two are correct. However, it shows the value of rate after the scanf to be 0.00 regardless of what number I enter. I suspect the cause will be obvious, but I'm just not seeing it. I'd appreciate a little help pinpointing it.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>


int main()
{
	double moPay, rate, principal, term;
	int months;
/*	- moPay is the monthly paymount amount to be calculated
	- rate is the interest rate
	- principal is the balance due before interest
	- term is the number of years the payments will last
	- months is the the term converted into months by multiplying by 12 
*/
	
	printf("\nEnter the amount of the loan using\ndecimal places (ex: $1000 is 1000.00): ");
	scanf("%lf", &principal);
	printf("\nNow enter the term of the loan in years: ");
	scanf("%d", &term);
	printf("\nEnter the interest rate for the loan (example: 5%% is 5): ");
	scanf("%lf", &rate);


	printf("\nPrincipal is %.2lf, term is %d, and rate is %lf.\n", principal,term,rate);
	
system("pause");
return 0;
}