Answer to Question #271264 in C# for Chuchi

Question #271264

Use if statement and Write a program that computes and assesses the tuition fee of the




students in one trimester, based on the given mode of payment below:







Plan (key) Discount (-) or Interest (+)







Cash (1). 10% discount







Two-Installment (2) 5% discount







Three-Installment(3) 10% interest







The target-user must use the key in selecting or choosing the mode of payment. The first input







data is the tuition fee, and the second input data is the mode of payment.

1
Expert's answer
2021-11-25T02:32:51-0500
using System;
using System.Collections.Generic;


namespace App{
    class Program{
        static void Main(string[] args)
        {


            Console.Write("Enter tuition fee: ");
            double tuition = double.Parse(Console.ReadLine());
            Console.Write("Press 1 for Cash\n      2 for Two-Installment \n      3 for Three-Installment");
            Console.Write("\nEnter mode of payment: ");
            int mode = int.Parse(Console.ReadLine());
            if (mode == 1)
            {
                double discount = tuition * .10;
                double total = tuition - discount;
                Console.WriteLine("Your tuition fee is: " + total);
            }
            else if (mode == 2)
            {
                double discount = tuition * .05;
                double total = tuition - discount;
                Console.WriteLine("Your tuition fee is: " + total);
            }
            else
            {
                double interest = tuition * .10;
                double total = tuition + interest;
                Console.Write("Your tuition fee is: " + total);
            }






            Console.ReadLine();
        }
    }
}



Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS