0% found this document useful (0 votes)
27 views3 pages

Name: Trisha Caisip Subject: ICOM111 Year and Section: BSCS 1-YA-1

The document contains a C program that calculates tuition fees based on different payment modes: cash, two installments, and three installments. It applies a discount for cash payments and calculates interest for installment payments. The program prompts the user for the tuition fee and the chosen payment mode, then outputs the total tuition fee accordingly.

Uploaded by

Trisha Caisip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Name: Trisha Caisip Subject: ICOM111 Year and Section: BSCS 1-YA-1

The document contains a C program that calculates tuition fees based on different payment modes: cash, two installments, and three installments. It applies a discount for cash payments and calculates interest for installment payments. The program prompts the user for the tuition fee and the chosen payment mode, then outputs the total tuition fee accordingly.

Uploaded by

Trisha Caisip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Name: Trisha Caisip

Subject: ICOM111
Year and Section: BSCS 1-YA-1

#include <stdio.h> 
#include <conio.h> 
int main()  

    double tuitionfee, cash, twoinstall, threeinstall, discount, interest; 
    int Mode; 
   
    printf("\n1 for cash \n2 for Two installment  \n3 for Three installment
" ) ; 
   
 
      printf(" \n\nEnter tuition fee: "); 
      scanf("%lf" , &tuitionfee) ; 
   
      printf(" \n\nEnter Mode of payment: "); 
      scanf("%i" , &Mode) ; 
 
    if(Mode == 1){ 
 
        printf("cash: "); 
 
        discount = tuitionfee * .30; 
 
        cash = tuitionfee - discount; 
 
        printf("\nYour Total Tuition Fee is %2.f" , cash); 
    } 
 
    if (Mode == 2){ 
     
        printf("Two-Installment: "); 
 
        interest = discount * .05; 
     
        twoinstall = tuitionfee + twoinstall; 
 
         printf("\nYour Total Tuition Fee is %2.f" , twoinstall); 
    } 
    if (Mode == 3){ 
     
        printf("Three-Installment: "); 
 
        interest = tuitionfee * .05; 
     
        threeinstall = discount + twoinstall; 
 
         printf("\nYour Total Tuition Fee is %2.f" , threeinstall); 
    } 
 
 
    //output 
    printf("This is a Tuition Fee Assesment Program\n") 
    return 0; 
  
}

You might also like