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
. List down mental health problems that may arises with excessive use of digital social networking Do we ever need to be concern
Snowcat [4.5K]

Answer:

Excessive utilization of digital instant messaging could perhaps lead to numerous mental health conditions.

Explanation:

  • The massive pressure just to preserve a privileged lifestyle the same as peer group and other such influencers.
  • Cyberbullying would also be a key component of the social mainstream press. This might cause stress.

Yes, researchers undoubtedly need to worry about who becomes familiar with the internet. There's a whole number of news items living with the effects of over-using social networking sites. There seemed to be headlines that a teen must have been strongly affected by someone with a man as well as ransacked with real money by encouraging them to stay married to her.

8 0
3 years ago
All computers preform disk utilization the same software.<br> true or false
nikitadnepr [17]
"All computers preform disk utilization the same software "
This is false .
3 0
4 years ago
Read 2 more answers
Write a program to add two number marie simulator.
Gnoma [55]
Int a, b;
cout<<"write to numbers";
cin>>a>>b;
cout<
8 0
3 years ago
Write a function named "json_filter" that takes a JSON formatted string as a parameter in the format of an array of objects wher
7nadin3 [17]

Answer:

Check the explanation

Explanation:

kindly check the well written code below to get the solution to your question.

import json

def json_filter(input_string):

   jsonFormat = json.loads(input_string)

   result = []

   for obj in jsonFormat:

       if obj["temperature"] > 38.46:

           result.append(obj)

   return json.dumps(result)

7 0
3 years ago
Two or more computers connected together is referred to as a(n)
son4ous [18]
Two or more computers connected together is referred to as a network.
So the answer is <span>B. network.</span>
8 0
3 years ago
Other questions:
  • Write a program that takes nouns and forms their plurals on the basis of these rules:
    8·1 answer
  • Bayley wants to connect a new external hard drive to his Windows PC. He wants the fastest connection type available because he p
    10·2 answers
  • Tiff is the default file format for most digital cameras. <br> a. True <br> b. False
    12·1 answer
  • I REALLY NEED HELP WITH THIS ASSIGNMENT. IT WOULD BE GREATLY APPRECIATED IF SOMEONE HELPED ME. I'M NOT GOOD AT COMPUTER SCIENCE
    6·2 answers
  • Are goals that<br> have concrete criteria for measuring<br> progress toward their attainment.
    5·1 answer
  • Indicate whether the following statements are true or false:
    14·2 answers
  • Hello im looking for someone to answer my question. Its about a coding project called "Quiz Master". Im having trouble with the
    7·1 answer
  • Which of the following best describes what a long-term goal is?
    13·1 answer
  • What is the purpose of creating a primary key in a database
    14·1 answer
  • What is computer system ?​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!