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.
Asked
Active
Viewed 337 times
-5
-
4I'm voting to close this question as off-topic because its homework – patrick Mar 14 '18 at 15:49
-
1What is the question? – AlEmerich Mar 14 '18 at 15:49
-
Missing a lot of details. In which programming language would you like to do it? For which platform ... – Charles-olivier Demers Mar 14 '18 at 15:55
-
@AlEmerich this is the question: 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. – Francis Akujobi Mar 14 '18 at 16:05
-
@Charles-olivierDemers Yes, the details, i too figured that out. I'd like to use java or the just algorithm flow would be okay. it's from Logic building and effective problem solving – Francis Akujobi Mar 14 '18 at 16:08
-
@0x4f3759df It's no home work. Was asked by a friend of mine, couldn't give in much, so decided to ask it here. Thank you – Francis Akujobi Mar 14 '18 at 16:09
1 Answers
1
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 ""

mak-273
- 62
- 1
- 7