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]
3 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]3 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
When a user problem cannot be solved by the help desk at the first level of resolution, the problem is ___________ to the second
PIT_PIT [208]

Answer: escalated

Explanation:

7 0
2 years ago
How do you change the Background image or picture on Windows desktop?
Mademuasel [1]
Go to settings, personalization, then background. Select the photo file you want to use. Should look like this.

5 0
3 years ago
Three primary types of data that a forensic investigator must collect, in this order: 1.Volatile data 2.Temporary data 3.Persist
posledela

Answer:

1. volatile data

2. temporary data

3. persistent data

seems like you already got it correct

Explanation:

7 0
2 years ago
What is the difference, if any, between a Portable Media Player (PMP) and a Digital Media Device (DMD)? PMPs can be analog or di
lara [203]

Answer:

PMPs are typically referred to interchangeably.

Explanation:

3 0
3 years ago
Which is the best response to receiving a threating text from a classmate
Yuri [45]

Answer:

send a threatening text in reply, then block the phone number block the phone number, then contact his phone service provider immediately delete the text, then report the incident to authorities ignore the message, then get a new cell phone number.

Explanation:

5 0
2 years ago
Read 2 more answers
Other questions:
  • Given a string variable named sentence that has been initialized , write an expression whose value is the the very last characte
    14·1 answer
  • Information technology is the study of managing, processing, and retrieving information.
    5·1 answer
  • What would I need to make the perfect music video
    10·1 answer
  • The Active Directory Users and Computers tool can be used to:______.
    11·1 answer
  • The voluntary linkage of computer networks around the world is called the ______.
    7·1 answer
  • Celeste is writing a paper. However, two pages in, her computer shuts down unexpectedly. She never saved her paper, and all her
    12·2 answers
  • In the language of the World Wide Web, "this page cannot be displayed" means A. your computer's software is damaged. B. the ISP
    10·2 answers
  • Write a program that outputs a subtraction practice problem for a student, outputting the larger random number
    12·1 answer
  • Full form of http.<br>wrong answer will be reported ​
    6·2 answers
  • What is pseudocode? O A way of describing a set of instructions in text form using plain english O A diagrammatic representation
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!