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
Sergio039 [100]
3 years ago
8

Write a main method that prompts the user for an integer between 1 & 20 (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:
yarga [219]3 years ago
4 0

Answer:

int main() {

   int num;

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

   cin>>num;

   if(num<1 || num>20)

   {

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

       {

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

           cin>>num;

       }

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

   }

return 0;

}

Explanation:

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

You might be interested in
Storage device that is installed inside your computer is called?
liraira [26]
Its either called an HDD or an SSD
3 0
3 years ago
What is it called when an attacker convinces you to enter personal information at an imposter website after receiving an email f
yaroslaw [1]

Answer:

Phishing

Explanation:

Phishing is a type of cyber attack in which the attacker masquerades as a trusted entity via e-mail and trick the recipient into clicking a malicious link that could steal user data including login details, credit card information e.t.c A phishing attack can have devastating effects such as Identity theft, Unauthorised purchase or stealing of funds on individuals.

The common types of phishing are<em>: Vishing, Smishing, Email Phishing, Search Engine Vishing, Whaling</em> e.t.c

3 0
4 years ago
Read 2 more answers
In spreadsheet programs, labels and constant values are always copied exactly to the new location; what happens to formulas when
Dima020 [189]

Answer:

absolute cell referencing

Explanation:

Excel has an A1 reference style, which means that the columns are called letters A to XFD and the rows have numbers, 1 to 1,048,576. The total number of columns in Excel 2007 is 16384.

A cell can contain a value, formula or constants. A formula begins with a sign = (equal). You can use values ​​from other cells in your formula. To use another value, create a reference to the cell that contains the value you want to use in your formula.

When you copy a cell that contains a relative reference and paste it into another cell, the relative reference changes

When you copy a formula that contains relative references, the reference changes when you paste it into another cell.

How much the reference changes in relation to the position of the copied cell and the position of the new cell in which the formula is pasted. Excel uses relative references by default.

Instead, an absolute reference in a formula remains the same if it is copied to another cell.

8 0
4 years ago
One emerging type of trojan horse is called a ____-access trojan.
Sliva [168]
<span>One emerging type of Trojan horse is called a remote-access Trojan (RAT).
</span> RAT is a malware program.  With this Trojan horse an intruder is given administrative control over a target computer. The RAT controls the system via a remote network connection as if by physical access. It is typically installed<span> invisibly with a user-requested program.</span>
3 0
4 years ago
1) All of this information is part of a ________ in a database.
Nata [24]
1.D - Field
2.C - Field Names
<span>3.A - Format the table
</span><span>4.C - Blank Fields Or Records</span>
5 0
3 years ago
Read 2 more answers
Other questions:
  • Consider an interface p ublic interface NumberFormatter { String format (in n); } Provide four classes that implement this inter
    15·1 answer
  • . Dеclarе a onе-dimеnsional array of 30 doublеs (on thе stack) namеd rainfall
    11·1 answer
  • Select the correct answer.
    8·1 answer
  • PLEASE HELP
    15·2 answers
  • Write a program that has the following String variables: firstName, middleName, and lastName. Initialize these with your first,
    7·1 answer
  • Pick an appliance or an electronic device that you use at home that is powered from the wall outlet. Specify which electronics d
    10·1 answer
  • What is the feature of ram for beginners
    5·2 answers
  • NEED FIVE QUESTIONS ANSWERED!!!
    7·1 answer
  • The notes added to slides can be seen during the presentation. TRUE OR FALSE​
    13·1 answer
  • Using only AND, OR and inverter gates to implement the above Boolean equation, how many gates are needed
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!