To find whether a number is even or odd without using any
conditional operator??
Answer Posted / azad sable,chiplun.
void main()
{
int n;
clrscr();
printf("enter any no.");;
scanf("%d",&n);
if(n%2==0)/*remainder after division by 2*/
printf("\nthe no. is even");
else
printf("\nthe no. is odd");
}
getch();
}
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
Define Array of pointers.
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
What are directives in c?
How do we declare variables in c?
What is double pointer in c?
what are the 10 different models of writing an addition program in C language?
A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler
What is difference between %d and %i in c?
what is uses of .net
How do I copy files?
What are the difference between a free-standing and a hosted environment?
What are the different types of objects used in c?
What is function what are the types of function?
Explain built-in function?
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;