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]
2 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]2 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
How do I delete my Brainly account?
Triss [41]

Answer:

yeah how? please tell me

Explanation:

5 0
2 years ago
Read 2 more answers
Your browser has blocked your from your crucial secure intranet sites. What could be the problem?.
Alenkinab [10]

A browser is a program that allows and provides the user access to information and web pages on the internet. It blocks someone when their SSL certificate status has been voided.

<h3>What is an SSL certificate?</h3>

An SSL (Secure Sockets Layer) certificate is a digital code and certificate present on the web that authenticates and provides security for communication. It is a security protocol that allows encrypted transmission.

The firewall supervisor sets the rule to block or allow the users to connect to Crucial Secure Intranet Sites based on their SSL certificates. SSL certificate if gets revoked then does not allow users to reach the site and declares it to be a potential risk.

Therefore, the browser is not reachable when the SSL certificate gets expired.

Learn more about SSL certificates here:

brainly.com/question/24276018

#SPJ1

3 0
1 year ago
A business has recently deployed laptops to all sales employees. The laptops will be used primarily from home offices and while
lys-0071 [83]

C. OS hardening.

Making an operating system more secure. It often requires numerous actions such as configuring system and network components properly, deleting unused files and applying the latest patches.

The purpose of system hardening is to eliminate as many security risks as possible. This is typically done by removing all non-essential software programs and utilities from the computer.

5 0
2 years ago
Materials used in front office
mina [271]

Answer:

A Telephone, Printer, Computers, Security Monitor

4 0
2 years ago
Is co2+4h2--&gt; ch4 + 2h2o a combustion​
Nadya [2.5K]

Answer:

No its not a combustion its a formation.

Explanation:

7 0
3 years ago
Other questions:
  • What OS has a large market share but is limited because it can be installed only on one particular brand?
    8·2 answers
  • How can earn more answer from brainly less than two minutes, please
    9·1 answer
  • divide the input array into thirds (rather than halves), recursively sort each third, and finally combine the results using a th
    15·1 answer
  • Differences between electromechanical era and electronic era in point.<br>PLZ HELP​
    6·1 answer
  • create a boolean variable called sucess that will be true if a number is between -10 and 10 inclusively python
    11·1 answer
  • You have added a table to your web page consisting of two columns and five rows, including the header row. in the first header c
    13·1 answer
  • How would you describe the relationship between blocks of code and commands?<br>HELP​
    10·1 answer
  • What will be displayed after code corresponding to the following pseudocode is run? Main Set OldPrice = 100 Set SalePrice = 70 C
    10·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
  • What does it mean when someone says your voice doesn’t match how u look
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!