Create a program to enter computer programming class,(University = Bahria, Department = BSE, Class = Programming).
code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace cp_theory_task_paractise
{
class Program
{
static void Main(string[] args)
{
string uni,depart,clas;
Console.WriteLine("Enter your university");
uni = Convert.ToString(Console.ReadLine().ToLower());
if (uni=="bahria")
{
Console.WriteLine("Enter your Department");
depart = Convert.ToString(Console.ReadLine());
if (depart=="bse" || depart=="BSE")
{
Console.WriteLine("Enter your class");
clas=Convert.ToString(Console.ReadLine().ToLower());
if (clas=="programming")
{
Console.WriteLine("welcome to bse programming section");
}
else
{
Console.WriteLine("Only Programming section are allowed");
}
}
else
{
Console.WriteLine("only bse student allowed");
}
}
else
{
Console.WriteLine("Other Istitute student is not allowed");
}
}
}
}
Comments
Post a Comment