Write a program to find given number is even or odd without
using any control statement.
Answers were Sorted based on User's Feedback
Answer / rani
#include<stdio.h>
#include<conio.h>
void main()
{
char str[][10]={"even","odd"};
int no;
clrscr();
printf("\nEnter a number...");
scanf("%d",&no);
printf("\n%d is %s",no,str[no%2]);
getch();
}
Is This Answer Correct ? | 13 Yes | 1 No |
Answer / saneemask
main()
{
{
char a[][5]= {"Even","Odd"};
int n;
printf("Enter any no.: ");
scanf("%d",&n);
printf("%s",a[n%2]);
getch();
}
{
Is This Answer Correct ? | 3 Yes | 0 No |
what is a headerfile?and what will be a program without it explain nan example?
What does %d do in c?
Why isnt any of this standardized in c?
Implement bit Array in C.
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.
write a program that prints a pascal triangle based on the user input(like how many stages) in an efficient time and optimized code?
What functions are in conio h?
What is class and object in c?
How do you construct an increment statement or decrement statement in C?
how many times of error occur in C
A B C D E F G F E D C B A A B C D E F F E D C B A A B C D E E D C B A A B C D D C B A A B C C B A A B B A A A