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
damaskus [11]
3 years ago
7

Write a program to input a number and check whether it is even or odd number

Computers and Technology
1 answer:
Mashutka [201]3 years ago
3 0

Answer:#include <stdio.h>

int main() {

   int num;

   printf("Enter an integer: ");

   scanf("%d", &num);

   // true if num is perfectly divisible by 2

   if(num % 2 == 0)

       printf("%d is even.", num);

   else

       printf("%d is odd.", num);

   

   return 0;

}

You might be interested in
If an image has only 4 colors, how many bits are necessary to represent one pixel’s color? Describe a new custom encoding that u
MakcuM [25]

Answer:

1) 2 bits 2) shown in explanation 3) shown in explanation 4) 22 bits per pixel (2.75 bytes)

Explanation:

As a bit is one of two states, 1 or 0, 2 bits is sufficient to represent 4 colors:

00 = color 1

01 = color 2,

10 = color 3,

11 = color 4

This would be the custom type of encoding for that specific image as it only uses 4 colors.

Now to calculate the amount of memory saved, which is quite simple:

24-2=22

So you Would save 22 bits per pixel or 2.75 bytes per pixel.

5 0
3 years ago
A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called
MissTica
<span>A document that promises to pay specified sums of money on specified dates and is a debt to the issuer is called a bond</span>
6 0
3 years ago
I have been trying for 2 days to make an account, but it says registration cannot be completed at this time. It is extremely ann
Lady_Fox [76]

Answer: Ok what kind account are you trying to make if you need a account i can make one for you here is my hangout email . So i can give you the info to the account i made for you.

6 0
3 years ago
Read 2 more answers
Your child has broken the RJ-45 port of your laptop by sticking clay into it and there are no wireless networks available in you
sesenic [268]

Answer:

آمل أن يساعد هذا Purchase and use a USB to RJ-45 adapter-yes

fiber_manual_record Enable NIC teaming to increase your bandwidth

Explanation:

67.185.94.80

6 0
2 years ago
Explain three ways you can get home safely if the friend you rode with has drugs or alcohol in his or her system and you prevent
Lelu [443]
You could organised to be picked up, call a taxi or a sober peer or take public transport.
7 0
4 years ago
Other questions:
  • Can i uninstall adobe lightroom 6 and reinstall
    13·1 answer
  • Protected base class members cannot be accessed by: a.friends of the base class.
    6·1 answer
  • Which of the following is not true of credit cards
    15·1 answer
  • Create a program to calculate the wage. Assume people are paid double time for hours over 60 a week. Therefore they get paid for
    10·1 answer
  • The _______ is the continuing development of the internet that allows everyday objects embedded with electronic devices to send
    11·1 answer
  • What kind of battery does a dji spark have?
    12·1 answer
  • Multisensory input/output devices, such as data gloves or jumpsuits, are commonly used with _______________ systems.
    12·1 answer
  • Software que busca, detecta y elimina malware tipo espía; puede instalarse en la computadora de manera aislada o en conjunto con
    11·1 answer
  • What type is the combination of an integer and a string
    13·1 answer
  • What is the difference between an html opening tag and a closing tag?.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!