Hello Daniweb, I'm new to C and I need help with this basic calculator. It's supposed to calculate investment, only it never gives me the correct result Here is the source,
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <math.h>
int main()
{
double result;
int a;
int b;
int c;
printf("Enter the amount of money to be invested:");
scanf("%d", &a);
getchar();
printf("Enter the percentage");
scanf("%d", &b);
getchar();
printf("Enter the period of investment (years)");
scanf("%d", &c);
getchar();
result = a * pow (2.71828183, b * c);
printf("You will end up with %f", result);
return 0;
}