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
irina [24]
2 years ago
8

Ask the user to enter a number. Display whether the number is odd or even. computer science answers

Computers and Technology
2 answers:
notsponge [240]2 years ago
6 0

Answer:

Write a C program to check whether a number is even or odd using if else. How to check whether a number is even or odd using if else in C program. C Program to input a number from user and check whether the given number is even or odd. Logic to check even and odd number using if...else in C programming.

Explanation:

lilavasa [31]2 years ago
3 0

Answer:

See the explanation below.

Explanation:

In the beginning, we use the modulus operator i.e. %, to check whether a number is even. If a number is fully divided by 2 without giving a remainder, it is an even number. A working code is given below in the attachment.

For larger numbers we use faster algorithm techniques. Read more about  an interesting algorithm to find prime numbers, named, sieve of eratosthenes method by visiting: cutt.ly/rgc4dmr

To run a code online, my favorite IDE is repl.it

Visit: repl.it/languages/python3

to run a sample code now without installation setups.

Best Regards!

You might be interested in
PLEASE HELP!! Computer science test
tatiyna

Answer:

See Explanation

Explanation:

Given

The attached function

What the recursion does is that; it adds up individual digits from N to 0

Solving (a): Each output when N = 6

For N = 6.

The function returns the following values:

f(6) = 6

Then: 6 + f(5)

Then: 6 + 5 + f(4)

Then: 6 + 5 + 4 + f(3)

Then: 6 + 5 + 4 + 3 + f(2)

Then: 6 + 5 + 4 + 3 + 2 + f(1)

Then: 6 + 5 + 4 + 3 + 2 + 1 + f(0)

Then: 6 + 5 + 4 + 3 + 2 + 1 + 0 = 21

Solving (b): The output when N = 7

Using the same process in (a) above.

The output is 28

6 0
3 years ago
One reason to buy a home instead of rent a home is:
vazorg [7]
A is the correct Answer

7 0
3 years ago
You want some points? whoever answers first gets 48 points. no cap. better be quick.
LekaFEV [45]

Answer:

4

Explanation:

5 0
2 years ago
Read 2 more answers
Suppose you can access the caches in the local DNS servers of your department. Can you propose a way to roughly determine the We
lubasha [3.4K]

Answer:

We can periodically take a snapshot of the Domain Name System (DNS) caches in the local  Domain Name System (DNS) servers.

Explanation:

We can periodically take a snapshot of the Domain Name System (DNS) caches in the local  Domain Name System (DNS) servers. The Web server that appears most frequently in the  Domain Name System (DNS) caches is the most popular server. This is because if more users are interested in a Web server, then Domain Name System (DNS) requests for that server are more frequently sent by users. Thus, that Web server will appear in the  Domain Name System (DNS) caches more frequently.  

6 0
3 years ago
Which of the following galaxy types is most likely to be clearly identifiable, regardless of orientation? SBc
Reil [10]

Answer:

The most likely galaxy type to be identifiable regardless of orientation is: Irr

Explanation:

The Irr galaxies don't have a discernable or usual shape; that is why it is relatively easy to identify.

When we talk about E type galaxies, this statement proves itself by the way the cumulus of stars compounds the galaxy. The elliptical galaxies have the form of ellipses, with a reasonable distribution of stars. The degree of eccentricity is the number that complements the E letter; that's why E0 galaxies are almost spherical, while E7 is considerably elongated.

SBc, SBa galaxies are spiral; this means it can be flat in some angles difficulting their identification process; in this case, the last letter means the way the arms display their form, with "c" having a vague form and "a" well-defined arms. That's why in some angles can be mistreated as another type of galaxy.

3 0
3 years ago
Other questions:
  • Connected contacts require___ to open.
    11·1 answer
  • What runs a network, steering information between computers and managing security and users?
    11·1 answer
  • Based on the passage​ and/or drawing on your prior​ knowledge, you realize that an HMO is​ what?
    9·1 answer
  • Eric would like to have a color textbook that makes it look as if the character in an image is speaking. Which object should he
    14·1 answer
  • To execute a prepared SQL statement, you can use the ________________ and execute() methods of the PDOStatement object to set pa
    10·1 answer
  • Which of the following people was a member of FFA?
    7·1 answer
  • Which screen should be open to customize or personalize a desktop background?
    15·2 answers
  • Answer the questions about PowerPoint using the drop-down menus,
    15·2 answers
  • What line of business (L'Oréa)?​
    8·2 answers
  • 5. Nadia wants to calculate the total interest, which is the total amount of the payments minus the loan amount. In cell F6, ent
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!