It is really basic stuff, im just stuck and cant procede.
Im trying following calculation, but it just wont work:
#include<stdio.h>
int main(){
double amount;
double interest_rate;
double tax_d = (amount * interest_rate) / 100;
float tax_f = (amount * interest_rate) / 100;
printf("\n write amount: ");
scanf("%lf" , &amount);
printf("\n write interest rate: ");
scanf("%lf", &interest_rate);
printf("Tax (double) : %lf\n" , tax_d);
printf("Tax (float) : %lf\n" , tax_f);
return 0;
}
This doesnt work properly:
double tax_d = (amount * interest_rate) / 100;
float tax_f = (amount * interest_rate) / 100;
Any help will be appreciated.