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");
}
}
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");
}
}
Enter the number of wheel in a car:
ReplyDelete4
Enter the number of wheels in a motorcycle:
2
4:is the number of wheels in a car
2:is the number of wheels in a car