Search code examples
algorithmlogicflowchart

write an algorithm that will accept a temperature as input from a user, and advise the user to wear a jacket


write an algorithm that will accept a temperature as input from a user, and advise the user to wear a jacket. Based on the temperature, the algorithm should either tell the user to bring a heavy jacket (colder than 32 degrees), light jacket (between 32 and 50 degrees), or no jacket at all.


Solution

  • 1. read (temperature)
    
    2. if (temperature<32):
       print("bring heavy jacket")
    3. else if f (32<temperature<50):
       print("bring light jacket")
    4. else :
       print("no jacket")
    

    you have not mentioned any language and its very simple . as simple as your explanation ""