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

How can you best describe the relationship between advertising and television?
Which question below is likely the best question to help you plan and organize informational research writing on the following topic: (industries/businesses th
what are 2 problems with ancient maps
What was life like before the typewriter?
List and explain at least four major powers of the Legislative Branch.
What punishment would you expect if you fell asleep on sentry duty?
Why didnt beowulf bring men with him to fight grendels mother?
Which of these did the japanese form near the end of world war ii?
Which quantity is proportional to 15⁄3?
During the __________ period of greek art, an architectural format was developed that served as a model for all later greek temples.