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
Artyom0805 [142]
4 years ago
9

Write a program that could find whether the number entered through keyboard is odd or even the program should keep on taking the

value till the user ends.
Computers and Technology
1 answer:
natulia [17]4 years ago
7 0

Answer:

using namespace std;

int main() {

int number;

while (1) {

 cout << "Enter a number: ";

 cin >> number;

 cout << number << " is " << ((number % 2) ? "odd" : "even") << endl;

};

return 0;

}

Explanation:

This is a c++ version. Let me know if you need other languages.

The (number % 2) is the essence of the program. It returns 0 for even numbers, and 1 for odd numbers (the remainder after division by 2).

You might be interested in
Computer simulations can: A. accurately predict the weather a month in advance.
loris [4]
I believe the answer is A but i am not too sure :/
7 0
4 years ago
Select the correct line of missing code to create an output of "hello."
s2008m [1.1K]

Answer:

B

Explanation:

This feels like an error on the question issuer's part.

3 0
3 years ago
There is an old saying in golf: "You drive for show and you putt for dough." The point is that good putting is more important th
Molodets [167]

Answer:

You just need to look at the pro pga amd determine it from there

Explanation:

I have no idea what what im saying but i sound smart right

4 0
3 years ago
One type of wire sequence commonly used for ethernet cables is called the ________ sequence
monitta

Answer:

100BaseT

Also called Fast Ethernet

Good luck...

8 0
3 years ago
5. Name the special window that displays data, when you insert a chart.
AVprozaik [17]

Answer:

A.Datasheet

Explanation:

I hope it's helpful

7 0
3 years ago
Other questions:
  • What field in an IPv4 packet is altered to prioritize video streaming traffic over web surfing traffic?
    11·1 answer
  • What does the metric column in a routing table do?
    8·1 answer
  • Which one of the following statements referring to mobile Internet
    5·2 answers
  • How would you convert an integer value to a float value in Python?
    10·1 answer
  • Agent Hunt is transferring classified files from the CIA mainframe into his flash drive. SSS represents the size of the files on
    12·1 answer
  • How is a composite key implemented in a relational database model?
    11·1 answer
  • If an individual receives 1.8 mGy while standing 4 ft from a source of radiation for 2 minutes, which of the following option(s)
    9·1 answer
  • Write a program that simulates rolling one die using the following steps: 1. Prompt the user for the number of sides on the die.
    13·1 answer
  • What type of photography is represented by a photograph of a dog on a beach ?
    11·1 answer
  • You are supposed to do a report on something that interests you. You decided to do a report on dogs. As you research, you take n
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!