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
alexgriva [62]
3 years ago
12

Write an algorithm that asks a user to enter a number between 1 and 10. (This range includes the numbers 1 and 10.) When they en

ter the number, check that it is actually between 1 and 10. If it is not, ask them to enter a number again. Continue to ask until they enter a valid number. Once their number is valid, output the number. (C++ form)
Computers and Technology
1 answer:
Nataliya [291]3 years ago
4 0

Answer:

do{

   cout<<"Introduce number \n"; //print the message

   cin>>num; //set the value of the number given

}while(num<1 || num>10); //repeat while the number is out of the range

cout<<"Number: "<<num; //print the number

Explanation:

The idea behind this code is to create a loop in which I can compare the number given  (between 1 and 10) and then print the number or get back and ask the number again.

#include <iostream>

using namespace std;

int main()

{

   int num; //create num variable

do

{

   cout<<"Introduce number \n"; //print the message

   cin>>num; //set the value of the number given

}while(num<1 || num>10); //repeat while the number is out of the range

cout<<"Number: "<<num; //print the number

}

You might be interested in
Within a single program, __________________ allows multiple parts, or threads, to run simultaneously.
jekas [21]
<span>It should be single-user/multitasking os.</span>
4 0
4 years ago
Which of the following is the estimate of the minimum amount of time it would take to perform a task? (Points : 2) Minimal durat
kondor19780726 [428]

Answer:

Optimistic duration

Explanation:

The following three concepts are Project management concepts:

Optismitic duration: Estimation of the shortest duration of a task, taking into account the difficulty, etc.

Pessimistic duration: Estamation of the longest duration of a task, taking into account the difficulty, etc

Expected duration: Expected duration of a task, kind of a compromise between the optmistic duration and the pessimistic duration.

Which of the following is the estimate of the minimum amount of time it would take to perform a task?

The answer is Optimistic duration

7 0
3 years ago
In a complex system, many subsystems interact with one another. How do these systems interact in terms of inputs and outputs?
Artemon [7]

Answer:

I think in there transmission you know inputs into ports like for their own

Explanation:

likeslike Spanish and is obviously inputs and outputs their portsinto the portsdifferent ports you know

4 0
3 years ago
Outlines are effective because they:
sammy [17]
B. to help put ideas in order of importance

8 0
4 years ago
Read 2 more answers
How does confidentiality protect people and their online activity?
zlopas [31]
The answer is C Explanation: process of elimination
5 0
3 years ago
Other questions:
  • What is an individual piece of data called in a database? coding A field B file C record or D tittle
    9·1 answer
  • Explain why living things store energy in lipids instead of in carbohydrates
    5·1 answer
  • What word can you spell with the letters e, e, a, m, g, t, and k?
    10·1 answer
  • Time complexity: Be sure to show your work. Suppose that a particular algorithm has time complexity T (n) = 10 ∗ 2n, and that ex
    7·1 answer
  • An
    9·1 answer
  • Explain how class (static) variables and methods differ from their instance counterparts. Give an example of a class that contai
    7·1 answer
  • With a DUI charge on a driver’s record A. the price of his/her insurance greatly increases. B. he/she may drive only during day
    5·2 answers
  • Sally is editing her science report about living things. She needs to copy a paragraph from her original report.
    13·1 answer
  • In what order does the Cascade look at factors to determine which CSS rule to follow?
    14·1 answer
  • (Brainliest!!)<br><br> How do i get rid of a headache?
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!