what is the other ways to find a logic to print whether a
number is an even or odd wit out using % symbol??????? i
know three different ways to print it. so i need any other
different logic>>>>>
Answer Posted / govind279
#include<stdio.h>
main()
{
int x;
printf("Enter an ineteger ");
scanf("%d",&x);
if(x&0x1)
printf("Odd\n");
else
printf("Even\n");
}
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is strcpy() function?
What is the advantage of c?
Explain what is dynamic data structure?
What are the types of functions in c?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?
Explain what is the difference between text files and binary files?
What is indirection? How many levels of pointers can you have?
What does calloc stand for?
program to convert a integer to string in c language'
What are the types of i/o functions?
Without Computer networks, Computers will be half the use. Comment.
Why is c so important?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.