changsky changsky
  • 19-02-2022
  • Computers and Technology
contestada

how to write a code that determines if a number is odd or even?
the code should start with a variable declaration

Respuesta :

bushrahossain
bushrahossain bushrahossain
  • 19-02-2022

Answer:

//code in c++

#include <iostream>

using  namespace std;

int main() {

   int a;

   cin>>a;

   if(a%2==0){

       cout<<"Even number";

   }

   else{

       cout<<"Odd number";

   }

return 0;

Explanation:

Answer Link

Otras preguntas

1.30% of what number is 96? 2. 63 is 15% of what number?
jack, jill and bill each carried a 48-ounce bucket full of water down the hill.  By the time they reached the bottom, jack's bucket was only 3/4 full, jill's wa
The model of the universe that suggests that the sun is the center of the universe was first brought by A. Brahe.B. Kepler.C. Ptolemy.D. Copernicus.Can also som
Wat is 20/24 as a decimal and a percent
One positive number is 5 times another number. The difference between the two numbers is 200, find the numbers.
which of these geometry terms best describes an unsharpened pencil? a. ray b.line segment c. point d.plane
Solve for X in y=12x-5
What would happen if our Eyes were unable to control the amount of light that enteres them?
find all critical values of the function g(x)=5/(x²-x+6)
find all critical values of the function g(x)=5/(x²-x+6)