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
3 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]3 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
With the exception of a(n) ____________________, the Paste command allows you to paste an object without creating a link.
mylen [45]
<span>Chart
</span>With the exception of a Chart, the Paste command allows you to paste an object without creating a link.
4 0
3 years ago
(((PLEASE HELP QUICK))) When writing research questions you should begin with ____.
tankabanditka [31]

Answer:

The answer is A or C. I hope this helps narrow down your answers.

8 0
3 years ago
Read 2 more answers
Hardware parts with images​
Inessa [10]
There is nothing here I’m sorry that I can’t hel
6 0
3 years ago
Read 2 more answers
When a computer is shut down, the information in the memory (the RAM, the caches, the register) is
Hitman42 [59]

Answer:

WASHED OUT OR ERASED

Explanation:

The memory modules or the chips store the data as well as the programs when they have to be processed through the CPU, They are on the motherboard. However, when the computer is switched off, then the information stored on the RAM, cache or register gets erased, and only the data which is saved on the ROM gets saved when the power is turned off.

8 0
3 years ago
Which piece of personal information do websites often require users to enter?
Olin [163]

Answer:

Your Social Security Number

Explanation:

3 0
3 years ago
Other questions:
  • Which of the following are peripheral devices?
    7·2 answers
  • What is a URL (Please explain)?
    9·1 answer
  • When you copy a formula that contains an absolute reference to a new location, the reference ____. a. has a dotted outline in it
    6·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • What are Important points to include about preventing the download of malware?
    14·1 answer
  • What will be result of below if statement.
    13·1 answer
  • Help please and thank you :)
    14·1 answer
  • I put 100 points in here
    9·1 answer
  • 100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
    5·1 answer
  • 3. What of the following is the main components of computer system?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!