I cant figure out why it won't print out the value for the month.
After it asks for my last value, it suddenly closes.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <ctype.h>
int main()
{
int term;
double rate, monthp, princ, months;
rate = rate/1200.0;
months =term*12.0;
printf("Please enter the the principle on your payment: ");
scanf("%lf", &princ);
printf("Please enter the rate on your payment: ");
scanf("%lf", &rate);
printf("Please enter the term of your payment in years: ");
scanf("%d", &term);
monthp = ((rate + (rate/(pow((1 + rate),(months))-1))) * princ);
printf("Monthly Payment is: %lf", monthp);
getchar();
return 0;
}