harish reddy

harish reddy

  • NA
  • 162
  • 33.4k

Method issue and invoking

Jan 31 2018 10:25 PM
Sir, i am struck here. Using methods,I wnated to input temperature in farenheit and wanted to get output in celsisu. this is my requirement .
 
1. also i get confused what should go in to brackets of method . For example in this case of method name converted, in the brackets should "temperaturef" be there or "temperaturec" be there?
 
class FahrenheittoCelsiusConversion
{
static float Main()
{
float temparaturef = float.Parse(Console.ReadLine());
converted();
}
static float converted(float temperaturef)
{
float temperaturec=(temperaturef-32)*5/9;
}

Answers (5)