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
AlekseyPX
2 years ago
10

Write a main method that prompts the user for an integer between 1 & 10 (inclusive). If the user enters an invalid number, p

rompt for another one. When a valid number is entered, call activity with that number as a parameter.
Computers and Technology
1 answer:
stepan [7]2 years ago
5 0

Answer:

int main() {

   int n;

   cout<<"Enter the integer n"<<endl;

   cin>>n;

   if(n<1 || n>10)

   {

       while(n>10 || n<1)//taking input if the number is not within range..

       {

           cout<<"Enter the number again"<<endl;

           cin>>n;

       }

       activity(n);//calling activity with the n..

   }

return 0;

}

Explanation:

Above written is the main function in which a prompting an integer between 1 and 10 if it is not within range then again taking input.Then after that calling activity with n as argument.

You might be interested in
Drag each label to the correct location on the image.
andrezito [222]

Answer:

1.) Relative cell reference - A1

2.) Absolute cell reference - $D$2

3.) Mixed cel reference - $D2

Explanation:

In Microsoft Excel, cell references are very important and critical when dealing with formula. They can give you what you’re looking for or make your entire worksheet incorrect.

A cell reference is a cell address or a range of cell addresses that can be used in a formula.

There are three types of cell references and they are;

a) Relative reference

b) Absolute reference

c) Mixed reference

A relative cell reference is a cell reference that changes when you copy the formula to other cells. It s usually just a normal cell reference like A1, B2, C3. If a formula with a relative cell reference is copied down to other cells, the formula will change. That is a formula with a relative cell reference changes with respect to the cell which it is copied to.

An absolute reference does not change when you copy the formula to other cells. In absolute references, the dollar sign $ is used to “lock” both the row and column so that it does not change when it is copied to other cells. An example is $D$2.

Using a mixed cell reference, one is trying to see that only either the row or column changes with respect to other cells when they are copied. It is like “locking” either the column or the row while changing the other. Just like from the example, $D2 is a mixed cell reference where only the column is locked such that only the row changes when the formula is copied to other cells.

7 0
3 years ago
After a normal system shutdown, when the computer is turned off, contents of the memory used to store bios settings are
kiruha [24]
The settings are retained

<span>Technically, Bios software is stored in a non-volatile ROM (Read-Only Memory) chip found on the motherboard.  Usually, this kind of chip retains its contents even after a normal system shutdown. Rom chips contains programs that are collectively referred to as BIOS chip or Basic Input/Output Services</span>
8 0
3 years ago
Read 2 more answers
Which of the following is a message sent from one person to another using the Internet?
Alexxx [7]
Where is the message lol ?
8 0
2 years ago
Read 2 more answers
Which type of device log contains the most beneficial security data?
zhuklara [117]
The security Log is your Answer.
6 0
2 years ago
Let C(x) be the statement "x has a cat," let D(x) be the statement "x has a dog," and let F(x) be the statement "x has a ferret.
allsm [11]

Answer:

See attached for answer and explanation

Explanation:

Note: the question is incomplete, consider the statements below as the statements to be expressed in terms of C(x), D(x), F(x), quantifiers, and logical connectives.

(a) A student in your class has a cat, a dog, and a ferret.

(b)  All students in your class have a cat, a dog, or a ferret.

(c) Some student in your class has a cat and a ferret, but not a dog.

(d) No student in your class has a cat, a dog, and a ferret.

(e) For each of the three animals, cats, dogs, and ferrets, there is a student in your class who has this animal as a pet.

7 0
3 years ago
Other questions:
  • Given main(), define the Team class (in file Team.java). For class method getWinPercentage(), the formula is:teamWins / (teamWin
    15·1 answer
  • Organisms are classified as producers or consumers acorrding to the way they
    11·2 answers
  • Which of the following people choose a career path for the right reasons
    12·2 answers
  • True or False? In a C++ floating-point constant, a decimal point is not required if exponential (E) notation is used
    13·1 answer
  • . A wireless ……..is a device used to resolvewireless network connectivity problems.
    8·1 answer
  • The purpose of​ a/an _________ system is to capture best practice solutions and program them into a set of rules in a software p
    13·1 answer
  • Consider the code below. When you run this program, what is the output if the temperature is 77.3 degrees Fahrenheit?
    6·1 answer
  • Complete the statement below using the correct term.<br>Website managers use<br>every day​
    11·2 answers
  • Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
    6·2 answers
  • A user reports that he cant browse to a specific website on the internet. From his computer, you find that a ping test to the We
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!