Code:
#include <stdio.h>
int main(void)
{
double percent,dollars,periods,Future
Future value of investment = dollars(1+percent)pow(periods)
printf("Interest rate per period: ");
scanf("%lf", &percent);
printf("Present value: ");
scanf("%lf", &dollars);
printf("Number of periods: ");
scanf("%lf", &periods);
printf("Future value of investment: $%.2f\n",Future);
return 0;
}
When attempting to compile i get:
abrown05@potter :~/Documents$ gcc -Wall Investment.c
Investment.c: In function ‘main’:
Investment.c:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Future’
Investment.c:19 : error: ‘Future’ undeclared (first use in this function)
Investment.c:19 : error: (Each undeclared identifier is reported only once
Investment.c:19 : error: for each function it appears in.)
Comment