Pages

Write A program that take input university courses and crdth hour and calculate Fee Chalan....

INPUT:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FEE_STRUCTURE
{
    class Program
    {
        static void Main(string[] args)
        {
            double crdhr, crdhr1, crdhr2, crdhr3, crdhr4, crdhr5, crdhr6;
            string sub1, sub2, sub3, sub4, sub5, sub6;
            Console.WriteLine("enter first subject name");
            sub1 = Console.ReadLine();
            Console.WriteLine("enter second subject name");
            sub2 = Console.ReadLine();
            Console.WriteLine("enter third subject name");
            sub3 = Console.ReadLine();
            Console.WriteLine("enter fourth subject name");
            sub4 = Console.ReadLine();
            Console.WriteLine("enter fifth subject name");
            sub5 = Console.ReadLine();
            Console.WriteLine("enter sixth subject name");
            sub6 = Console.ReadLine();
            Console.WriteLine("Select crdhr for {0}",sub1);
            crdhr1 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Select crdhr for s{0}", sub2);
            crdhr2 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Select crdhr for {0}", sub3);
            crdhr3 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Select crdhr for {0}", sub4);
            crdhr4 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Select crdhr for {0}", sub5);
            crdhr5 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Select crdhr for {0}", sub6);
            crdhr6 = Convert.ToInt32(Console.ReadLine());
            crdhr = crdhr1 + crdhr2 + crdhr3 + crdhr4 + crdhr5 + crdhr6;
            Char op;
            double res;
            Console.WriteLine("For civilian press 1 and for naval press 2");
            op = Convert.ToChar(Console.ReadLine());

            if (op == '1')
            {
                res = crdhr * 6000;

                Console.WriteLine("For civilian student semester fee is {0}", res);
            }

            else

                if (op == '2')
                {
                    res = (crdhr * 6000) / 2;

                    Console.WriteLine("For navel student semester fee is {0}", res);
                }

        }

    }
}

OUTPT:



No comments:

Post a Comment