find a number whether it is even or odd without using any
control structures and relational operators?
Answer Posted / shashi
#include<stdio.h>
main()
{
int n;
string s[2]={"Even","odd"};
Printf("Enter the number");
scanf("%d",&n);
n=n%2;
printf("The value is %s",s[n]);
}
Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
What is the use of static variable in c?
What is static memory allocation?
This is a variation of the call_me function in the previous question:call_me (myvar)int *myvar;{ *myvar += 5; }The correct way to call this function from main() will be a) call_me(myvar) b) call_me(*myvar) c) call_me(&myvar) d) expanded memory
What are the 5 elements of structure?
Are pointers really faster than arrays?
What language is lisp written in?
What are the types of type specifiers?
How do I read the arrow keys? What about function keys?
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
Function calling procedures? and their differences? Why should one go for Call by Reference?
explain what is fifo?
What is array of structure in c?
What is a class c rental property?
What are the types of i/o functions?
5 Write an Algorithm to find the maximum and minimum items in a set of ānā element.