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

Slavery in the united states was an example of which pattern of intergroup relations? question 3 options:
Do you think Faustus is a tragic hero based on what you have read so far? Use examples from the text to support your response.
Please help and explain
Which two sets of lines in William Wordsworth's poem reflect the poet’s view that nature’s beauty can live on in our memories and continue to delight us even af
What is a segment that extends from the center of a circle to a point on the circle?
What battle is considered the turning point of the American revolution in south Carolina
PLEASE HELP ME!! 16 POINTS!! ONE QUESTION!! HELP! Why must Sayadio use a gourd to catch his sister's spirit? She was a farmer of gourds in life. She does
Help with math question 24
the senior class has a picnic during the last week pf classes. each member of the class can choose to have a hamburger hotdog or sub and has a choice of either
Which if the following conditions best match this graph: A: normal conditions B: hot summers C: cold springs D: harsh winters Will give the brainliest answer.