Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

[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:

  3. TomSands

    TomSands

    Joined:
    Apr 22, 2020
    Posts:
    3
    It would be so much easier if we would all use the metric system. I don't get it why would anyone use anything else when it is clearly that the metric system works perfectly and 90% of the world is using it. It is really hard when you go to USA and everything is in miles, fahrenheit and pounds. I don't get why they just don't accept better system, i bet that they struggle when they come to Europe. While i was there i had to use converter and thankfully i found a good one, I was converting stuff like "50 c to f" all the time. That converter will also help you convert kg to lbs and miles to kilometers, it is very useful when you find yourself in that situation.
     
    Last edited: Apr 29, 2020