Write a C# Sharp program to find the eligibility of admission for a professional course based on the following criteria

  • برمجة سي شارب
  • برمجة

Write a C# Sharp program to find the eligibility of admission for a professional course based on the following criteria:

Marks in Maths >=65
Marks in Phy >=55
Marks in Chem>=50
Total in all three subject >=180
or
Total in Math and Subjects >=140

Sample Output:

Find eligibility for admission :                                                                              
----------------------------------                                                                                                    
Eligibility Criteria :                                                                                        
Marks in Maths >=65                                                                                           
and Marks in Phy >=55                                                                                         
and Marks in Chem>=50                                                                                         
and Total in all three subject >=180                                                                          
or Total in Maths and Physics >=140                                                                           
-------------------------------------                                                                         
Input the marks obtained in Physics :65                                                                       
Input the marks obtained in Chemistry :60                                                                     
Input the marks obtained in Mathematics :75                                                                   
Total marks of Maths, Physics and Chemistry : 200                                                             
Total marks of Maths and  Physics : 140                                                                       
The  candidate is eligible for admission. 

الأجوبة

using System;  
public class Exercise10  
{  
    public static void Main()
{  
   int p,c,m;

    Console.Write("\n\n");
    Console.Write("Find eligibility for admission :\n");
    Console.Write("----------------------------------");
    Console.Write("\n\n");

   Console.Write("Eligibility Criteria :\n");
   Console.Write("Marks in Maths >=65\n");
   Console.Write("and Marks in Phy >=55\n");
   Console.Write("and Marks in Chem>=50\n");
   Console.Write("and Total in all three subject >=180\n");
   Console.Write("or Total in Maths and Physics >=140\n");
   Console.Write("-------------------------------------\n");


    Console.Write("Input the marks obtained in Physics :");
    p = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Chemistry :");
    c = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Mathematics :");
    m = Convert.ToInt32(Console.ReadLine());
   Console.Write("Total marks of Maths, Physics and Chemistry : {0}\n",m+p+c);
   Console.Write("Total marks of Maths and  Physics : {0}\n",m+p);

   if (m>=65)
         if(p>=55)
             if(c>=50)
	        if((m+p+c)>=180||(m+p)>=140)
	           Console.Write("The  candidate is eligible for admission.\n");
	        else
	          Console.Write("The candidate is not eligible.\n\n");
             else
	    Console.Write("The candidate is not eligible.\n\n");
         else
	   Console.Write("The candidate is not eligible.\n\n");
    else
     Console.Write("The candidate is not eligible.\n\n");
}
}
using System;  
public class Exercise10  
{  
    public static void Main()
{  
   int p,c,m;

    Console.Write("\n\n");
    Console.Write("Find eligibility for admission :\n");
    Console.Write("----------------------------------");
    Console.Write("\n\n");

   Console.Write("Eligibility Criteria :\n");
   Console.Write("Marks in Maths >=65\n");
   Console.Write("and Marks in Phy >=55\n");
   Console.Write("and Marks in Chem>=50\n");
   Console.Write("and Total in all three subject >=180\n");
   Console.Write("or Total in Maths and Physics >=140\n");
   Console.Write("-------------------------------------\n");


    Console.Write("Input the marks obtained in Physics :");
    p = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Chemistry :");
    c = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Mathematics :");
    m = Convert.ToInt32(Console.ReadLine());
   Console.Write("Total marks of Maths, Physics and Chemistry : {0}\n",m+p+c);
   Console.Write("Total marks of Maths and  Physics : {0}\n",m+p);

   if (m>=65)
         if(p>=55)
             if(c>=50)
	        if((m+p+c)>=180||(m+p)>=140)
	           Console.Write("The  candidate is eligible for admission.\n");
	        else
	          Console.Write("The candidate is not eligible.\n\n");
             else
	    Console.Write("The candidate is not eligible.\n\n");
         else
	   Console.Write("The candidate is not eligible.\n\n");
    else
     Console.Write("The candidate is not eligible.\n\n");
}
}
using System;  
public class Exercise10  
{  
    public static void Main()
{  
   int p,c,m;

    Console.Write("\n\n");
    Console.Write("Find eligibility for admission :\n");
    Console.Write("----------------------------------");
    Console.Write("\n\n");

   Console.Write("Eligibility Criteria :\n");
   Console.Write("Marks in Maths >=65\n");
   Console.Write("and Marks in Phy >=55\n");
   Console.Write("and Marks in Chem>=50\n");
   Console.Write("and Total in all three subject >=180\n");
   Console.Write("or Total in Maths and Physics >=140\n");
   Console.Write("-------------------------------------\n");


    Console.Write("Input the marks obtained in Physics :");
    p = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Chemistry :");
    c = Convert.ToInt32(Console.ReadLine());
    Console.Write("Input the marks obtained in Mathematics :");
    m = Convert.ToInt32(Console.ReadLine());
   Console.Write("Total marks of Maths, Physics and Chemistry : {0}\n",m+p+c);
   Console.Write("Total marks of Maths and  Physics : {0}\n",m+p);

   if (m>=65)
         if(p>=55)
             if(c>=50)
	        if((m+p+c)>=180||(m+p)>=140)
	           Console.Write("The  candidate is eligible for admission.\n");
	        else
	          Console.Write("The candidate is not eligible.\n\n");
             else
	    Console.Write("The candidate is not eligible.\n\n");
         else
	   Console.Write("The candidate is not eligible.\n\n");
    else
     Console.Write("The candidate is not eligible.\n\n");
}
}
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...