In this C# tutorial we "convert given inches into equivalent yard,feets and inches" . Here we are taking three variables
"y" for yards ,"f" for feets and "i" for inches respectively. Now, lets get started!!
"y" for yards ,"f" for feets and "i" for inches respectively. Now, lets get started!!
using System; class prg { public static void Main(String []args) { int y,f,i; Console.WriteLine("Enter Inches : "); i=Convert.ToInt32(Console.ReadLine()); y=i/432; i=i%432; f=i/12; i=i%12; Console.WriteLine("Yard =" + y + "Feet =" + f + "Inches =" + i); } }
0 comments:
Post a Comment