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 is the maximum length of an identifier?
What is a char c?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
How do I swap bytes?
Explain can you assign a different address to an array tag?
How can I write a function analogous to scanf?
What is character constants?
Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon
Using which language Test cases are added in .ptu file of RTRT unit testing???
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is the size of enum in c?
What are high level languages like C and FORTRAN also known as?
shorting algorithmS
What is the use of header files?
Write a program of advanced Fibonacci series.