The inertia of a prosthetic leg needs to be measured Data an
Solution
Console.ReadLine() will give the input in string form. In order to convert it into integer form, we need to use Convert.ToInt32(). Therefore, answer of Q1 and Q2 will be like:
Q1.) int x = Convert.ToInt32(Console.ReadLine());
Q2.) int numBoxes = Convert.ToInt32(Console.ReadLine());
To output, we need to use Console.WriteLine(). Therefore answer to Q3. will be
Q3.) Console.WriteLine(\"A:{0}, B:{1}\",A,B);
So, if values of A and B are 1 and 2, respectively. Then output will be like:
A:1, B:2
Q4.) string mySchool = Console.ReadLine();
Q5.)
Code:
using System;
public class Test
{
public static void Main()
{
// your code goes here
double X = Convert.ToDouble(Console.ReadLine());
double Y = Convert.ToDouble(Console.ReadLine());
Console.WriteLine(X*Y*2.5);
}
}
Input:
1
3
Output:
7.5
Link of code:
http://ideone.com/dCRijj
Hope it helps, do give your response.
