Question

Enter degrees Celsius100 The equivalent in Fahrenheit is 212 Hit Enter to exit

Write code in C# to produce above message.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

using System;

class MainClass {
public static void Main (string[] args) {
    Console.Write("Enter degrees Celsius: ");
    double c = Convert.ToDouble(Console.ReadLine());
    double f = 32 + (1.8 * c);
    Console.WriteLine("\nThe equivalent in Fahrenheit is " + f.ToString());
    Console.WriteLine("\n Hit Enter to exit.");
    Console.ReadLine();
}
}

Add a comment
Know the answer?
Add Answer to:
Write code in C# to produce above message. Enter degrees Celsius100 The equivalent in Fahrenheit is...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT