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
marissa [1.9K]
4 years ago
10

Write an app that reads an integer, then determines and displays whether the integer is odd or even. [Hint: Use the remainder op

erator. An even number is a multiple of 2. Any multiple of 2 leaves a remainder of 0 when divided by 2.]
Computers and Technology
1 answer:
Sholpan [36]4 years ago
8 0

Answer:

#include <stdio.h>// header file

int main() // main function definition

{

   int number; // variable declaration

   scanf("%d",&number); // user input for number

   if(number%2==0) // check the number to even.

   printf("Number is a even number"); // print the message for true value

   else

   printf("Number is a odd number"); // print the message for false value.

   return 0; // return statement.

}

Output:

  • If the user inputs is 2 then the output is "Number is a even number".
  • If the user inputs is 3 then the output is "Number is a odd number".

Explanation:

  • The above program is to check the even and odd number.
  • The first line of the program is used to include the header file which helps to understand the functions used in the program.
  • Then there is the main function that starts the execution of the program.
  • Then there is a variable declaration of number which is declared as an integer which takes the integer value because the program needs the integer only.
  • Then the scanf function is used to take the inputs from the user.
  • Then the if condition check that the number is divisible by 2 or not.
  • If it is divisible print "even number" otherwise print "odd-number".
You might be interested in
Which task is most suitable for creating an algorithm?
Anna71 [15]
A.
-HomeTaey
(ask anytime)
if I get it wrong, sorry
8 0
3 years ago
Read 2 more answers
Which of the following domestic appliances does not use a magnet?
alekssr [168]
Pressing iron isn’t domestic appliances
7 0
3 years ago
Read 2 more answers
PLEASE HURRY! Match terms in the first column with the order descriptions in column two.
zavuch27 [327]

Megabytes gigabytes terabytes - from smallest to largest

Petabytes terabytes kilobytes - largest to smallest

Exabytes zettabytes megabytes - in no apparent order

Explanation:

5 0
3 years ago
A firewall can consist of all devices positioned on the network _____________.
ale4655 [162]

Answer:

The answer to this question is "perimeter".

Explanation:

In computer science, the firewall is used to provide a network security system that manages network traffic like incoming and outgoing signals. This traffics is based on predetermined security rules. The firewall typically installs a boundary between a trusted inner network and an untrusted outer network, such as the Internet. It is a software concept and Perimeter firewalls manage the flow of network traffic and host or organization's border the boundary that provides the first line of security against outer attacks and blocking access to inappropriate content from inside an organization.

6 0
4 years ago
Plz help meeeeee QUICKLY!!! WORTH 15 POINTS!
Lady bird [3.3K]

Answer:

Im pretty sure Domain name system but dont trust me

Explanation:

8 0
4 years ago
Other questions:
  • You are working the 8:00 AM shift at the help desk. An irate user who fails to identify himself calls in claiming that his works
    7·1 answer
  • "This part of the computer fetches instructions, carries out the operations commanded by the instructions, and produces some out
    15·1 answer
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    11·1 answer
  • 1.the following code example would print the data type of x, what data type would that be?
    12·1 answer
  • Which can be used to plan a program?
    13·2 answers
  • As a project manager, why is analysis an important aspect of the job?
    10·1 answer
  • CAD software example​
    5·1 answer
  • One security component that doubles as a network component
    5·2 answers
  • Which workbook view is used most often in Excel?
    8·1 answer
  • Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!