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
a_sh-v [17]
3 years ago
14

Ed-Only g - Last Modified: November 2 -

Computers and Technology
1 answer:
valina [46]3 years ago
6 0

Answer:

Could u state this more clearly

Explanation:

You might be interested in
You will include code that will validate all user input. If the user inputs an invalid value, the program will respond with an e
alukav5142 [94]

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

8 0
3 years ago
Qbasic program to convert Nepali rupees into paisa​
Svetradugi [14.3K]

Answer:

INPUT "What is the amount of rupees you want converted into paisa"; rupees

paisa = rupees*100

PRINT paisa

Explanation:

done in QBASIC
the semicolon in the 1st line makes the question have a ? at the end. the rupees key word in the 1st line saves the input as a variable

then the second line multiplies by 100 since there are 100 paisa in 1 rupee

5 0
2 years ago
What is the decimal equivalent to 111111?
Ivan

Answer:

63

Explanation:

4 0
3 years ago
Read 2 more answers
Suzanne is following a fad diet. She has started to experience low energy during her workouts, and on a recent trip to the docto
Nastasia [14]

Answer:

Hi mate....

Explanation:

This is ur answer....

<em>-</em><em>-</em><em>></em><em> </em><em>Suzanne just facing low carbohydrates</em>....

hope it helps you,

mark me as the brainliest pls....

Follow me!

5 0
3 years ago
Read 2 more answers
Write a method with the signature "float sumArray(float[] data)" that takes an array of floats, and returns their sum.
My name is Ann [436]

Answer:

I will code in JAVA.

Preconditions:

  • The float array of data are declared and initialized.

public float sumArray(float[] data) {

float sum = 0;

for(int i = 0; i < data.length; i++) {

   sum = sum + data[i];

  }

return sum;

}

Explanation:

First, you have to declare a variable sum of type float and initialize with 0. In addition, this method has a for-loop to go through whole array of data and each element is added to the float value to sum. When the for loop ends, the sum variable is returned.

8 0
3 years ago
Other questions:
  • Hardware- The ______________ equipment that makes up the computer.
    6·1 answer
  • Which is a form of malware? A. clickjacking B. spam C. cookies D. Trojan horse
    7·2 answers
  • Who controls communication ethics?
    13·1 answer
  • Qazwsxedcrfvtgbyhnujmikolp. In which direction on the keyboard did I type in?
    14·2 answers
  • You have created a new DHCP scope with address range 192.168.1.1 to 192.168.1.254. You have five servers configured with static
    8·1 answer
  • What happens if the user sysadmin invokes the mail command interface and there are no unread mail messages?
    13·1 answer
  • The type of e-cards that have an antenna built into them are __________ cards.
    10·2 answers
  • What keyboard shortcut is used to move the cursor to the beginning or end of a document.
    11·1 answer
  • You are a security officer of a company. You had an alert from IDS that indicates that one PC on your Intranet is connected to a
    7·1 answer
  • Backing up your data on a regular basis is a part of the
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!