Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include int main() { int number; printf(Enter an integer: ); scanf(%d, &number); //Is number negative? if(number < 0) { printf(%d is negative. ,number); } else
#include
int main() { int number; printf("Enter an integer: "); scanf("%d", &number); //Is number negative? if(number < 0) { printf("%d is negative. ",number); } else { printf("%d is not negative ", number); } return 0; }
Instructions
1) Modify this program to test explicitly for positive, negative, and zero. 2) Determine whether the integer is even or odd. (hint: use the modulus operator %)
Please help with the program in C programming language. Thanks
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started