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
Waterpower was first harvested by ancient societies using
Maslowich
Not sure why this question is in Computers and Technology...

Answer should be c.
6 0
3 years ago
Write a program to output a big A like the one below
Gelneren [198K]

hope this helps, i'm a beginner so this might not be the most concise method

3 0
3 years ago
The Quick Search capability is found on which control?
choli [55]

Answer:

backstage view

Explanation:

6 0
3 years ago
The ___________ method returns the length of an array.
MaRussiya [10]

Answer:

A. Append

Explanation:

4 0
3 years ago
Read 2 more answers
How do you properly turn off a computer?
Ugo [173]

Answer:

with the power button or do the sleep or shut down

and by the type of computer

Explanation:

sry if its wrong

have a good day:)

-XxMissNobodyxX

7 0
2 years ago
Read 2 more answers
Other questions:
  • Which of the following accurately describes one way that individual goods
    11·1 answer
  • Charles Mott works for a company called VeriSign that acts a trusted third party to verify information. One of Charles' largest
    15·1 answer
  • Ted knows that macros can be helpful to him in his work with Excel spreadsheets,but he also knows they have their hazards,so he
    15·1 answer
  • Describe the difference between a myth and a fable.
    12·1 answer
  • A popular database software program called ____ offers a wizard and QBE tool to help build and generate SQL queries
    9·1 answer
  • Who plays xbox one offline and knows some multiplayer games that can be played offline.
    15·2 answers
  • Bryan's company is new and has limited funds to work with. He has been tasked with finding a telecommunications technology that
    7·1 answer
  • A Network Intrusion Detection System watches for potentially malicious traffic and _______ when it detects an attack.
    15·1 answer
  • You arrive at school on Friday for a field trip ! What a lucky day!You need to figure out what room you are in before leaving. Y
    9·2 answers
  • What are the two most common input and output devices?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!