using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication27
{
class shop
{
string item;
int up, total, unit;
public void accept()
{
Console.WriteLine("Enter the item name:");
item = Convert.ToString(Console.ReadLine());
Console.WriteLine("Enter units of item:");
unit = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the unnit price:");
up = Convert.ToInt32(Console.ReadLine());
}
}
class Program
{
static void Main(string[] args)
{
string cat;
shop s = new shop();
Console.WriteLine("Enter the catagory:");
cat = Convert.ToString(Console.ReadLine());
switch (cat)
{
case "women":
s.accept();
break;
case "men":
s.accept();
break;
case "girls":
s.accept();
break;
case "boys":
s.accept();
break;
case "babies":
s.accept();
break;
default:
Console.WriteLine("Invalid Selection");
break;
}
Console.ReadLine();
}
}
}
No comments:
Post a Comment