Search Unity

[Need Help] Temperature conversion from Celsius to Fahrenheit.

Discussion in 'Immediate Mode GUI (IMGUI)' 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: