Program that computes and assesses the tuition fee of the student in one semester using programming c language
#include <stdio.h>
int main() {
// we declare a variables
float Fee, totalFee;
int mode;
printf("Enter Tuition Fee: ");
scanf("%f", &Fee);
printf("Enter Mode of Payment: \n");
printf("| 1. 10 percentage discount\n");
printf("| 2. Two-Installment 5 percentage interest\n");
printf("| 3. Three-Installment 10 percentage interest\n");
scanf("%d", &mode);
// Total fee
if (mode == 1) {
totalFee = Fee * 0.9;
} else if (mode == 2) {
totalFee = Fee * 1.05;
} else if (mode == 3) {
totalFee = Fee * 1.1;
}
// Output
printf("Your total tuition fee is: %f", totalFee);
return 0;
}
Comments
Leave a comment