Answer:
// program in C#.
using System;
// class definition
class InchesToCentimeters
{
// main method of the class
public static void Main (string[] args)
{
// variable
int inches=3;
const double centimeters=2.54;
// find the centimeters in 3 inches
double result=inches*centimeters;
// print the centimeters in 3 inches
Console.WriteLine("{0} inches is {1} centimeters",inches,result);
}
}
Step-by-step explanation:
Declare and initialize "inches=3".Then declare a constant variable "centimeters" and initialize it with "2.54".Then find the centimeters in 3 inches and print the value.
Output:
3 inches is 7.62 centimeters