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
list the six external parts or "peripherals" of a computer system and identify which are output and which are input devices.
Tpy6a [65]
There are lots of different peripherals of computer systems. Some examples are listed below:

Input:
Keyboard
Mouse
Video Camera
Microphone
Joystick
Scanner

Output:
Monitor
Projector
Printer
Speakers

Any external device that gives input to or gets output from the computer is a peripheral.
7 0
3 years ago
A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce. Which statement can a developer use to retrieve
Mariana [72]

Answer:

The correct answer is option (B) "{!$Setup.Url_Settings__C.URL__c}".

Explanation:

In computer programing using Visualforce, "$Setup" refers to a global merge field that gives the user access to hierarchical custom settings. In this case, the developer needs to retrieve the correct URL to access the current user's profile and display this on a Visualforce Page. "$Setup" will give the developer access to the hierarchical custom settings in Visualforce, and the command "Url_Settings__C.URL__c" will provide the root access to the current user's profile.

4 0
3 years ago
Why it is so important for all application builders to always check data received from unknown sources, such as web applications
Aleks04 [339]
The already-long problem on hacking and other security-related cases necessitates for the application builders to check the data received from unknown sources. To further strengthen the security, even data received from known sources also need to be check as these may also contain harmful viruses creating critical problem to the application. 
6 0
3 years ago
What is a Boolean Expression?
ratelena [41]
The answer is C, an expression that evaluates to true or false.

In computer science, a Boolean expression is an expression used in programming languages that produces a Boolean value when evaluated. A Boolean value is either true or false.

( Lol. I’m in 7th grade doing college work, so this was fun to answer! )
4 0
3 years ago
You are a networking consultant who has been asked to penetration test the network of a small business. you located a target wir
cluponka [151]
<span> In a network that uses WPA2-PSK encryption you can bypass the encryption by using the weakness in the WPA2-PSK system and that is the following:the encrypted password is shared in what is known as the 4-way handshake. </span> When a client authenticates to the access point, the client and the AP go through a 4-step process of authentication.
8 0
3 years ago
Other questions:
  • HELP NOW PLZZ/ Question: Complete the sentence with the correct response.
    11·1 answer
  • How do you change between worksheets inside an excel workbook?
    13·2 answers
  • What error occurs when you perform an illegal math operation such as divide by zero
    13·1 answer
  • Assume that the following variables have been defined in a program: int x = 10; int y = 20; int z = 30; Write a cout statement t
    11·1 answer
  • Select the correct answer.
    6·2 answers
  • What is technology? *
    10·1 answer
  • What are the benefits of writing functions that use parameters and return? Try to list at least two.
    12·1 answer
  • Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0
    9·1 answer
  • What what do these two parts of the lift do ​
    14·1 answer
  • Use the ________ tag to configure a generic area on a web page that is embedded within a paragraph or other block display elemen
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!