Answer:
- You need to create a variable outside (before) the input loop.
- You need a variable inside your loop that temporarily holds the user input.
- In your loop, you will compare if the variable outside the loop is greater than (or less than) the new user input.
I don't know what program language you are using, but I will use python since it's easy to read and you will get the idea if you're using a different programming language.
<u>Code (Python)</u>
largestnum = 0
for x in range(6): <em>#loops 6 times</em>
newnum = int(input("Enter a number: ")) #ask user for input & converts to int.
if newnum > largestnum: <em>#if new number is greater than largest num </em>
largestnum = newnum <em>#make it the largest number</em>
<em> </em>print("Largest:", largestnum)
The reason why you need a variable outside of the loop is because after the loop is done all variables inside the loop are trashed and can no longer be accessed outside of the loop.
The pseudocode of the program is simply a prototype of the actual program
<h3>How to write the
pseudocode?</h3>
The pseudocode that does the requirements in the question is as follows:
- Start
- Get Input for amount of purchase
- Compute the state tax: sales tax = sales tax percentage * amount
- Compute the provisional sales tax: provisional sales tax = provisional sales tax percentage * amount
- Print the taxes
Read more about pseudocode at:
brainly.com/question/24735155
#SPJ1
Answer:
wwhwwwwnlcw lcwl. wl w l. w la a. a. ac aa cw w w w. w. w. w w. ww w. w w w. w w w ww w w. w w ww. w cs s js jw jw kw kw ks jpsbp svkhs ksl oheo
Answer:
Internet of things
Explanation:
Smart refrigerators are equipped with IoTs which helps to sense when one is running low on milk and sends a reminder through a wireless connection.
Internet of things is connectivity or network of things.
- It involves connection of different computing everyday devices which are able to interact with one another.
- They have found a wide range of application in our hospitals, homes, and even work places.
- The connectivity allows for more flexible controls and interaction wherever one might be with different components.
- It uses a network of objects that exchanges data intermittently.