Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Unity 2018.3 is now released.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

[Need Help] Temperature conversion from Celsius to Fahrenheit.

Discussion in 'Extensions & OnGUI' started by SmithSmutasdong, Feb 1, 2019.

  1. SmithSmutasdong

    SmithSmutasdong

    Joined:
    Feb 1, 2019
    Posts:
    2
    I'm very new to Unity and have never experienced coding C# until I got into my University. Apparently my professor in my uni taught us a little bit of C# until we study the part about Switch and Case. He taught us without any information in the e-book, and continued teaching us until the class ended. Knowing that we don't understand one bit, he decided to give us a lab assignment as the thread's title.
    His objective was to create a temperature conversion from Celsius to Fahrenheit using the math formula F=9/5*C+32. Decimal points are needed in division. I tried to translate some Thai sentences so that it'd be easier for you to understand.
    upload_2019-2-1_16-38-54.png
    ● Take the calculated Fahrenheit to test to show the fever condition of the body according to the following conditions.(Write the code by using if, else if)
    upload_2019-2-1_16-32-0.png
    upload_2019-2-1_16-38-45.png
    upload_2019-2-1_16-38-54.png
    These are all the examples the prof. gave us in the lab assignment sheet. I really have no idea how to use Switch Case since he didn't really explain any thing. So, Thank you very much in advance. ^^
     

    Attached Files:

  2. SmithSmutasdong

    SmithSmutasdong

    Joined:
    Feb 1, 2019
    Posts:
    2
    This is the only example the prof. showed, after he didn't tell us anything else, except for giving us the assignments.
    upload_2019-2-1_16-58-0.png
     

    Attached Files: