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
Brrunno [24]
3 years ago
14

You will include code that will validate all user input. If the user inputs an invalid value, the program will respond with an e

rror message and will ask the user to input the data again (use a do / while loop). Invalid values include:
Computers and Technology
1 answer:
alukav5142 [94]3 years ago
8 0

Answer:

See explanation (Program written in C++)

Explanation:

The question is incomplete as the invalid values were not included in the question.

However, to make the sense of it, I'll answer your question using the following conditions.

1. Invalid values include: Numbers less than 0 (See comments for explanations)

#include <iostream>

using namespace std;

int main() {

//This line declares num (for user input)

int num;

//The following iteration keeps repeating itself until a number greater than 0 is entered using do while loop

do{

//This line prompts user for input

cout<<"Numbers greater than 0: ";

//This line gets input from the user

cin>>num;}

while(num<1);//This condition checks for valid user input

cout<<"You entered: "<<num; //This line prints out the user input

}

2. Invalid values include: Odd Numbers

I'll make use of the above code (in 1)

Start by replacing:

cout<<"Numbers greater than 0: ";

with

cout<<"Even Numbers: "; //This prompts user for even numbers

Replace

while(num<1);

with

while(num%2==1); //This checks if input is odd. If yes, the loop is repeated

3. Invalid values include: Even Numbers

I'll make use of the above code (in 1)

Start by replacing:

cout<<"Numbers greater than 0: ";

with

cout<<"Odd Numbers: "; //This prompts user for Odd numbers

Replace

while(num<1);

with

while(num%2==0); //This checks if input is even. If yes, the loop is repeated

You might be interested in
Everybody at a company is assigned a unique 9 digit ID. How many unique IDs exist?
Brut [27]
If you include all zeroes, then it should be 1,000,000,000. Otherwise it’s 999,999,999.

Think of how between 0-9 theres 10 numbers, and use that logic towards 000000000-999999999
3 0
3 years ago
An important principle in information security is the concept of layers of security, which is often referred to as layered secur
Eva8 [605]

Answer:

Available options in question are

  1. a firewall :  
  2. a server
  3. an application
  4. control standard

Answer is : Control Standard. It is not an example of layer of security.

Explanation:

Defense in depth consists of three major domains like physical, technical and administrative. Layered Security will consists of best practices by combining multiple  security methods to mitigate vulnerabilities and attack vectors. It is used to protect resources at different levels.  

  • A firewall is used as layered security measure to secure networks and systems.It is most commonly used security measure for enterprise products.
  • A server is typical example of physical control. In this  it protects actual IT servers, high-end servers, cloud servers and any physical hardware and assets.  
  • An Application can be used an example of Layer security. Applications like Antiviruses, Vulnerability Scanners, Anti Malware software and Web Application firewall gateways are typical examples

Control Standard is not an example of Layered Security.

5 0
3 years ago
Which domain will redirect you to the amazon website?
Vinvika [58]

Answer:

Amazon.com

Explanation:

Every online business has a domain name that redirects to thier website usually has this format https:// of http:// followed by the domain name.

3 0
3 years ago
Which process refers to starting up a computer?<br> is the process of starting a computer.
Dennis_Churaev [7]

Answer: Boot Up or booting

Explanation:

6 0
3 years ago
Read 2 more answers
ICD-10-CM diagnosis codes are entered in Block 21 of the CMS-1500 claim. A maximum of __________ ICD-10- CM codes may be entered
SVETLANKA909090 [29]

Answer:

The answer to this question is 12.

Explanation:

You can enter a maximum of 12 ICD-10-CM codes on a single claim.Since we know that the codes entered in CMS-1500 claim are in the block of 21 in ICD-10-CM diagnosis.This should be kept in mind always in medical insurance.

So we conclude that the answer to this question is 12.

5 0
3 years ago
Other questions:
  • ¿Cuál es el objetivo principal de los servicios?
    7·1 answer
  • What is a browser? Give one example
    8·2 answers
  • How can i become an ailen?
    5·2 answers
  • You buy a new workstation that features an embedded RAID controller on the motherboard. You want to setup hardware RAID 10. How
    10·2 answers
  • Which is the purpose of adding B-Roll footage to a sequence?
    10·1 answer
  • When proposing a plan in detail for video production phases, fundraising, and outreaching, which section will you use to make su
    14·2 answers
  • How to you compute for the total room sales​
    10·1 answer
  • Which header will be the largest?<br><br> Hello<br><br> Hello<br><br> Hello<br><br> Hello
    14·2 answers
  • There are two main types of hard drive available to a computer. State what they are and describe their use.
    5·1 answer
  • If your computer determines the destination address of a network packet is to a remote network.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!