answersLogoWhite

0

# include

void main()

{

int a;

printf("\n Enter a number to find if its odd or even");

scanf("%d",&a);

if(a%2==0)

{

printf("\n The number entered is even");

}

else

{

printf("\n The number entered is odd");

}

getch();

}

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

How do you write a C program to check whether the number is odd or even Ps-using DEV complier?

To write a C program to determine if something is odd or even you need to be a programmer. To write a program in C is complicate and only done by programmers.


Write a program in c that prompt user with following lines add two integers test an integer for odd or even and quit?

write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit


C program to accept a sequence of number terminated by zero and sum all odd nos and even nos?

#include <stdio.h> main() { int n, odd=0, even=0; while (scanf("%d",&n)&&(n!=0)) (n%2)?++odd:++even; printf("odd: %d even: %d\n",odd,even); }


Write c program to find odd or even no?

For any number n you could use * (n % 2 == 0), which would be true for an even number, false for odd For an integer i, a simpler method would be * (i & 1), which would be true for an odd number, false for even


If n is an odd integer is n plus 6 odd as well?

Yes. If n is odd, then n + c where c is an even constant will be odd. n + d where d is an odd constant will be even.


What is odd loop in 'C' program?

odd loop means at least the loop execute once.


is 986 even or odd?

Even b/c if the last number is even then even and if the last number is odd then the number is odd so 986 _6_ is even


Can 5 odd numbers make 50?

No. Two odd numbers added together always give an even number. Two even numbers added together always give an even number. An odd and an even number added together always give an odd number. So, if we have 5 odd numbers - a, b, c, d and e a + b will be even c + d will be even So if (a + b) + (c + d) is even, adding e to that will have to be an odd number - but 50 is even, so it cannot be done.


Write a C Program to print sum of squares of odd numbers?

#include


Could u draw me a flowchart for this C program question 1.sum of nos. from 1 to n Check the no. in odd or even?

1. Read in 'n'2. Output n*(n+1)/2> Check the no. in odd or even?Both possible, has no significance.


Turbo c program that will determine if the input is odd or even number?

#include <stdio.h> int main() { printf("Program to find ODD or Even Number\n"); while(1) { int n = 0; printf("\nEnter a number(-1 for Exit): "); scanf("%d",&n); if( n 0) { printf("%d is a EVEN number.\n", n); } else { printf("%d is a ODD number.\n", n); } } return 0; }


Is fx equals c an even or odd function?

Even (unless c = 0 in which case it is either or both!)