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

Find 3 ratios that are equivalent to the given ratio. 3/8
Which expression is equivalent to r to the 9th over r to the 3rd
I know there is a very similar question already out there but my version is requesting different functions Cami is comparing the growth rates in the value of
you are dissatisfied with some practice in your school . write a letter to your friend in another school discussing at least three of these practice and the imp
Is Ni(NO3)3 ionic or covalent and why
what are kind of reflections ​
All the iron in a 2.000 g tablet was dissolved in an acidic solution and converted to Fe2+. This was then titrated with KMnO4. The titration required 27.50 cm3
The Old Kingdom existed in which time frame?
You get 25 points if you answer. :)Confucianism and Buddhism both flourished during the Tang and Song dynasties. What helps explain the growth of these belief s
The area of a rectangle is 221.6 m2. If the length is 16 m, what is the perimeter of the rectangle?