sumitrar363
sumitrar363 sumitrar363
  • 30-04-2021
  • Computers and Technology
contestada

write a program to input a number and check whether it is even or odd number
its qbasic question
no links plzz​

Respuesta :

usamariaz756
usamariaz756 usamariaz756
  • 01-05-2021

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;

}

Answer Link

Otras preguntas

benefits of running in the morning
Which list of events of the Athenian Empire is in the correct chronological order? A. i. A plague broke out in Athens. ii. The Peloponnesian War began. ii
When Twitter is used to gather a large group for a face-to-face meeting it is called a. Flash mob. Group mob. Tweet mob. Twitter mob.
similarities and differences between mitosis and meiosis
8 and 2 quadratic equations with the given roots.
when is the first day of spring
caffeine content in coffee
what is the largest speed this projectile can have without causing the cable to break?
what are the benefits of coconut oil
does a plant grow faster in light or dark