Answer Posted / kamal
* read a number … */
#include <stdio.h>
int main (void) {
int num; /* input number */
int rem; /* remainder …*/
/* get number from user */
printf(“Please enter a number: ”);
scanf(“%d”, &num);
/* calculate remainder … */
rem = num % 2;
if (rem == 0) {
printf(“even\n”);
} else {
printf(“odd\n”);
}
/* terminate program */
return 0;
}
| Is This Answer Correct ? | 4 Yes | 6 No |
Post New Answer View All Answers
The __________ attribute is used to announce variables based on definitions of columns in a table?
Are the outer parentheses in return statements really optional?
Why does this code crash?
Explain what is dynamic data structure?
how to build a exercise findig min number of e heap with list imlemented?
What is the best organizational structure?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is the function of this pointer?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
What is a pointer and how it is initialized?
How important is structure in life?
Is fortran still used in 2018?
How can I change the size of the dynamically allocated array?
What are actual arguments?