Coder Social home page Coder Social logo

eligibility-for-admission's Introduction

EX-1 Eligibility-for-Admission

Date : 21/3/23

Aim:

To write C# program to find the eligibility for admission to an engineering course

Algorithm:

Step 1 : Import the 'System' namespace to use the classes present in the 'System' namespace.

Step 2 : Declare the Main method.

Step 3 : Declare name variable in string format and marks variable in integer format.

Step 4 : Using " Console.Write " print the statement and get the input from user using " Console.ReadLine " .

Step 5 : Add the 3 subject marks and store it in sum_of_three. Add the marks of physics and maths and store it in sum_of_two.

Step 6 : Using Nested if loop check whether the student is eligible or not eligible for engineering admission with the conditions given.

Step 7 : Print the result.

Program:

Name : SWATHIKA G

Reg no : 212221230113

using System;
namespace eligible
{
    class marks
    {
        public static void Main(string[] args)
        {
            int mat, phy, chem,sum_of_three,sum_of_two;
            string name;
            Console.WriteLine("Enter the name");
            name = Console.ReadLine();
            Console.WriteLine("Enter the Math mark");
            mat = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter the Physics mark");
            phy = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("Enter the Chemistry mark");
            chem = Convert.ToInt32(Console.ReadLine());
            sum_of_three = mat + phy + chem;
            sum_of_two = mat + phy;
            if((mat>=65)&&(phy>=55)&&(chem>=50))
                {
                if((sum_of_three>=180)||(sum_of_two>=140))
                {
                    Console.WriteLine("{0} is Eligible for admission",name);
                }
                else
                {
                    Console.WriteLine("{0} is Not Eligible for admission", name);
                }

            }
            else
            {
                Console.WriteLine("{0} is Not Eligible for admission",name);
            }
        }
    }
}

Output:

Output_1

Output_2

Result:

Thus a C# program to find the eligibility for admission to an engineering course is written and executed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.