create a console-based application named ConvertInchesToCm whose Main() method prompts a user for a number of inches, passes the value to a method that converts the value to centimeters, and then returns the value to the main() method where it is displayed. An inch is 2.54 centimeters.
b. create a GUI application named ConvertInchesToCmGUI that uses a method. The program convets inches to centimeters when the user clicks a button.
Loading

Wim SturkenboomRank #2,527 · 554 reputationPosted Oct 6, 2014, 10:08 PM EDT
pad pad20 reputationPosted Oct 7, 2014, 9:09 AM EDT
Hemant SrivastavaRank #581 · 4.2K reputationPosted Oct 7, 2014, 9:42 AM EDT
It's very simple program you should try it first before asking
We generally learn only when we try :)
Try:
http://stackoverflow.com/questions/8443198/c-sharp-converts-inches-to-cents
Posted Oct 7, 2014, 11:16 AM EDT
class Program
{
static void Main(string[] args)
{
Console.Write("Input a inch value ");
double x = double.Parse(Console.ReadLine());
double y = x * 2.54;
Console.WriteLine(x + " inch = " + y + " cm");
Console.ReadKey();
}
}
pad pad20 reputationPosted Oct 8, 2014, 10:12 PM EDT
I am trying to do in GUI with same code but its not working. Please can any one help to write in GUI.
Wim SturkenboomRank #2,527 · 554 reputationPosted Oct 8, 2014, 10:20 PM EDT