using System;
class Vehicle
{
public int Number_of_tyres;
}
class MyVehicle
{
static void Main (string[] args)
{
Vehicle Motorcycle= new Vehicle();
Vehicle Car = new Vehicle();
Console.WriteLine("Enter the number of wheels in a car:");
Car.Number_of_tyres=Covert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter the number of wheels in a Motorcycle:");
Motorcycle.Number_of_tyres=Convert.ToInt32(Console.ReadLine());
Console.WriteLine("\n");
Console.Write(Car.Number_of_tyres);
Console.WriteLine(" :is the number of wheels in a Car\n");
Console.Write(Motorcycle.Number_of_tyres);
Console.WriteLine(" :is the number of wheels in a Motorcycle \n");
}
}
No comments:
Post a Comment