aaaaaaaaaaaaaaaaa
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
Console.Write("Enter Your Name: ");
string name = Console.ReadLine();
switch (name) //switching on 'name' value.
{
case "Bilal": //if 'name' have 'Bilal' OR 'Amir' OR
case "Amir": //'Zulfi' OR 'Huzaif' value then
case "Zulfi":
case "Huzaif":
Console.Write("U R Project Director in IT Park!!!"); //print this.
break; //and Break the process.
case "Nawaz": //if 'name' have 'Nawaz' OR 'Ali' OR
case "Ali": //'Zaheer' OR 'Inam' value then
case "Zaheer":
case "Inam":
Console.Write("U R Worker in IT Park!!"); //print this.
break; //and Break the process.
default: //if not in Above then
Console.Write("I Don't Know U!"); //print this.
break; //and Break the process.
}
Console.ReadKey();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
int a, b;
string op; //for operator I use string.
Console.WriteLine("Please Enter first number");
a = Int32.Parse(Console.ReadLine());
Console.WriteLine("Please Enter Operator + , - , * , /");
op = Console.ReadLine();
Console.WriteLine("Please Enter 2nd number");
b = Int32.Parse(Console.ReadLine());
switch (op)
{
case "+": //if 'op' have '+' value then
Console.WriteLine("Addition {0}", a+b); //add and print 'a' and 'b' values.
break;
case "-":
Console.WriteLine("Subtraction {0}", a-b);
break;
case "*":
Console.WriteLine("Multiplication {0} ", a*b);
break;
case "/":
Console.WriteLine("Division {0} ", a/b);
break;
}
Console.ReadLine();
}
}
}