Using Visual Studio Code, create a program in the language of your choice that: Requests the user to enter a number bet

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Using Visual Studio Code, create a program in the language of your choice that: Requests the user to enter a number bet

Post by answerhappygod »

Using Visual Studio Code, create a program in the language of
your choice that:

Requests the user to enter a number between 1 and 10
Creates an array containing the numbers 19, 85, and 2.
Loops three times (a single loop that runs three times):

the first run of the loop will multiply the number entered by
the first element of the array (19).
the second run of the loop will subtract the second element of
the array (85) from the result of the first calculation.
the third run of the loop will divide the result of the second
calculation by the third element of the array (2).


If the result is greater than the number originally entered,
then display the message "Your result is greater than X" - with "X"
being the number originally entered.
If the result is less than the number originally entered, then
display the message "Your result is less than X" - with "X" being
the number originally entered.
If the result is equal to the number originally entered, then
display the message "Your result is equal to X" - with "X" being
the number originally entered.


Make sure that your program works as expected.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply