Write a pro-gramme to determine whether the number is even or odd?
Answer Posted / azad sable, chiplun
void main();
{
int n;
clrscr();
printf("enter any number");
scanf("%d",&n);
if(n%2==0)
printf("\nthe number is even");
else
printf("\nthe number is odd");
}
getch();
}
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is masking?
Write a code to remove duplicates in a string.
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
Is boolean a datatype in c?
Explain the binary height balanced tree?
Where static variables are stored in memory in c?
main() { int i = 10; printf(" %d %d %d ", ++i, i++, ++i); }
What math functions are available for integers? For floating point?
a program that can input number of records and can view it again the record
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
How can a program be made to print the name of a source file where an error occurs?
What is identifier in c?
How can I use a preprocessorif expression to ?
How can I invoke another program (a standalone executable, or an operating system command) from within a c program?
How do I get a null pointer in my programs?