Question

Here's a Internet trick that when viral a bit ago. It must be true it was...

Here's a Internet trick that when viral a bit ago. It must be true it was on the internet, I did update it for this year, 2018:

  • Take your shoe size.
  • Mutliple by 5.
  • Add 50.
  • Multiple by 40.
  • Divide by 2.
  • Add 1018.
  • Subtract your birth year.
  • Answer = your shoe size and your age (first digit(s) shoe size, last 2 age)

Write an algorithm, using the above as your guide. Use answer as an accumulator, shoeSize as a variable and birthYear as a variable.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Thanks for the question, here is the algorithm, comments are given at the end of each line so that you can follow the steps.

let me know for any questions

================================================================================

answer=0 // create a variable answer assign 0 as the initial value

shoeSize = INPUT('Enter shoe size ') // input from user shoe size to a variable shoeSize

birthYear = INPUT('Enter birth year ') // input from user birth year to a variable birthYear

// calculation starts below

answer = shoeSize*5 // multiply shoe size by 5 and save it to answer

answer = answer+50   // add 50 to answer and save it to answer

answer = answer*40 // multiply 40 to answer and save it to answer

answer = answer/2   // divide answer by 2 and save the result to answer

answer = answer + 1018 // add 1018 with answer and save it back ti answer

answer = answer - birthYear // subtract birth year and save

OUTPUT(answer) // output the answer at the end

========================================================================

Add a comment
Know the answer?
Add Answer to:
Here's a Internet trick that when viral a bit ago. It must be true it was...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT