1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sholpan [36]
3 years ago
14

Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less

than 100. end each prompt with newline. ex: for the user input 123, 395, 25, the expected output is: enter a number (<100: enter a number (<100: enter a number (<100: your number < 100 is: 25
Computers and Technology
1 answer:
worty [1.4K]3 years ago
4 0
Here's a solution in plain C:

int num;
do { printf("enter a number (<100)\n"); scanf_s("%d", &num, sizeof(num)); } while (num >= 100);
printf("your number <100 is %d", num);

Note that this solution has flaws. It is unclear what should happen when the user types a negative number or a floating point number. Also it doesn't handle incorrect input (e.g., "aaa") at all.

But you get the idea.
You might be interested in
When converting text to a table, which feature should be used?
velikii [3]
I’m pretty sure it would be an insert tab
4 0
2 years ago
From your computer you are able to establish a telnet connection to a remote host but a traceroute to the host IP address result
Tanya [424]

Mostly firewalls may protect trace route to the host IP address.

<u>Explanation:</u>

When telnet has established the connection to a remote host. Then kindly check the host IP address and their gateway settings.  

If any resident firewall such as antivirus is stopping the ping method or gate way firewall is protecting both ends during trace route. Once the connection is established don’t worry about trace route on host IP  address.

Kindly check where the disconnections happens during the trace route.  in case it happens in between then they're stability on the connection issue which should be solved immediately.

8 0
2 years ago
What is a common use for append queries?
Karo-lina-s [1.5K]

Answer:

You use an append query when you need to add new records to an existing table by using data from other sources. If you need to change data in an existing set of records, such as updating the value of a field, you can use an update query.

6 0
3 years ago
Read 2 more answers
In order to organize your work effectively on the computer, where is the best place to save it?
Morgarella [4.7K]
Your answer is -

B. Folder Is the best place to save it
8 0
3 years ago
Read 2 more answers
Design a program that asks the user to enter a store’s sales for each day of the week. The amounts should be stored in an array.
sdas [7]

Answer:

Program given below

Explanation:

Total Sales

Assign the values of the variable as “Enter the store sales for Sunday” in Sun

Assign the values of the variable as “Enter the store sales for Monday” in Mon

Assign the values of the variable as “Enter the store sales for Tuesday” in Tue

Assign the values of the variable as “Enter the store sales for Wednesday” in Wed

Assign the values of the variable as “Enter the store sales for Thursday” in Thu

Assign the values of the variable as “Enter the store sales for Friday” in Fri

Assign the values of the variable as “Enter the store sales for Saturday” in Sat

Assign the values for the variable in array as [Sun, Mon, Tue, Wed, Thu, Fri, Sat]

Initialize tot = 0

Use the loop for calculating the total sales for the week,

for total_sales in store_sales:

    tot += total_sales

then display the result as,    

print "\n Total week sales = %2.f " %tot

sun = int(input("\n Enter the store sales for Sunday: "))

mon = int(input("\n Enter the store sales for Monday: "))

tue = int(input("\n Enter the store sales for Tuesday: "))

wed = int(input("\n Enter the store sales for Wednesday: "))

thu = int(input("\n Enter the store sales for Thursday: "))

fri = int(input("\n Enter the store sales for Friday: "))

sat = int(input("\n Enter the store sales for Saturday: "))

store_sales = [sun, mon, tue, wed, thu, fri, sat]

tot = 0

for store_sale in store_sales:

tot += store_sale

print "\n Total Week Sales: %2.f" %tot

We will have the following output:

<u>OUTPUT </u>

<u> </u>Enter the store sales for Sunday: 45

Enter the store sales for Monday: 56

Enter the store sales for Tuesday: 89

Enter the store sales for Wednesday:78

Enter the store sales for Thursday: 45

Enter the store sales for Friday: 12

Enter the store sales for Saturday: 23

Total Week Sales: 348

8 0
3 years ago
Other questions:
  • ​printers, monitors,​ tablets, cpus, and laptops are examples of​ ____________.
    14·1 answer
  • External hard disks use different technology than internal hard disks. ture or false
    6·1 answer
  • What command prompts should be used to assign an IP address to:
    9·1 answer
  • Write a program that uses for loops to perform the following steps: Prompt the user to input two integers: firstNum and secondNu
    15·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • Cash cows are always in
    7·1 answer
  • can you still receive messages on messenger from a person when you deleted the conversation with them? (But not blocked them)
    14·2 answers
  • 13. In cell B16, use the SUMIF function and structured references to display the total wins for teams in the Youth league.
    13·1 answer
  • Copy the formula in cell M7 to the range M8:M15, and edit the copied formulas to return the value from the column indicated by t
    15·1 answer
  • "necessarily is the mother of computer " justify this statement with respect to the evolution of computer.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!