write a c program to print a given number as odd or even
without using loop statements,(no if ,while etc)
Answer Posted / avinash kumar
#include<stdio.h>
main()
{
int a;
clrscr();
printf("enter a number:");
scanf("%d",&a);
if(a%2=0)
printf("even");
else
printf("odd")
getch();
}
Is This Answer Correct ? | 25 Yes | 22 No |
Post New Answer View All Answers
What are the scope of static variables?
What is the scope of static variable in c?
What are multibyte characters?
What is the right way to use errno?
What does 3 periods mean in texting?
What are external variables in c?
Can we declare variables anywhere in c?
Write a program to reverse a string.
write an algorithm to display a square matrix.
Why we use break in c?
how to introdu5ce my self in serco
What are volatile variables in c?
which is conditional construct a) if statement b) switch statement c) while/for d) goto
Can I initialize unions?
How to write a code for reverse of string without using string functions?