Write a programme to find even numbers without using any
conditional statement?
Answer Posted / mathiyazhagan
#include<stdio.h>
main()
{
char res[2][5]={"Even","Odd"};
int n;
printf("Enter a number :");
scanf("%d",&n);
printf("the given no is = %s",res[n%2]);
}
| Is This Answer Correct ? | 51 Yes | 7 No |
Post New Answer View All Answers
What is the meaning of && in c?
Why dont c comments nest?
Is printf a keyword?
How many data structures are there in c?
What header files do I need in order to define the standard library functions I use?
How can a program be made to print the name of a source file where an error occurs?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
Can you mix old-style and new-style function syntax?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
How to declare a variable?
swap 2 numbers without using third variable?
How do you determine a file’s attributes?
Why can arithmetic operations not be performed on void pointers?
What is c definition?