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
Which of the following commands would I use to begin a new presentation?
ki77a [65]

Answer:

begin >new

Explanation:

just trust me ok hehe

7 0
3 years ago
6
Novosadov [1.4K]

Answer:

government and New Zealand

Explanation:

you can see the web site name the name is gov.nz ,gov mens- government and nz means new Zealand

thank you like us

8 0
2 years ago
Read 2 more answers
When you use a business class with an object data source, the business class Group of answer choices must have attributes that m
DedPeter [7]

Answer: must have public properties that match the names of the bound fields

Explanation:

When a business class is used with an object data source, the business class must have public properties that match the names of the bound fields.

Having an attribute which match the names of the bound fields isn't necessary as well as having a constructor with parameters that match the names of the bound fields

Therefore, the correct option is B.

3 0
3 years ago
Purpose: This application provides experience with user input and interaction in the Console, writing files to disk, working wit
pishuonlain [190]

Answer:

the answer is c#/.net

Explanation:

5 0
3 years ago
A ________ is a very large general-purpose computer that is capable of performing very many functions as if these are done simul
Soloha48 [4]

Answer:

Mainframe Computer is capable of doing all the functions which are listed in question.

Explanation:

A mainframe is a very large general-purpose computer (usually costing millions of dollars) that is capable of performing very many simultaneous functions, supporting very many simultaneous users, and storing huge amounts of data. A microcomputer is the type of computer you use.

3 0
3 years ago
Other questions:
  • Todd, a travel agent, lost his job due to no need for his skill. This is an example of what type of unemployment?
    12·1 answer
  • When forced distribution is used to reduce leniency bias, this can cause __________ if a pfp system is in place?
    10·1 answer
  • A trojan horse
    12·1 answer
  • Missy creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her incom
    13·2 answers
  • My mac book airs touch pad stopped working and i can't click. what do i do?
    5·2 answers
  • 9
    10·1 answer
  • Which one of the following items is an example of software?
    5·1 answer
  • How dose society use computer in government?​
    5·1 answer
  • Convert 198 / 61 to ratio​
    9·1 answer
  • What are the steps to view two different versions of the same document at once?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!