Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1: Divisible (5 points in total) Write a C program that prompts the user for 3 integer numbers and then verifies if the numbers
Question 1: Divisible (5 points in total) Write a C program that prompts the user for 3 integer numbers and then verifies if the numbers are all divisible by the first number without a remainder AND that the three number are in increasing order. The program returns an error code of 0 if the numbers are divisible by the first number and in increasing order, it return an error code of 1 if the numbers are not divisible but in increasing order, 2 if they are divisible but not increasing, or an error code of 3 if the numbers are not divisible and not increasing. In addition to returning those error codes it will also print to the screen: "Divisible \& Increasing", or "Not divisible \& Increasing", "Divisible \& Not increasing", or "No divisible \& Not increasing". The program terminates after doing this one time. Example Execution: Please input three numbers: 1057 Not divisible \& Not increasing Vybihal Page 1 of 4 Please input three numbers: 369 Divisible \& Increasing Please input three numbers: 52010 Divisible \& Not increasing Do the following: - Write your program in the filename divisible.c - Compile using gec and the executable program must be called divisible. - The program must run at the command line as follows: ./divisible - Your program must work with the provided testing script: mini q q 1 tester.sh - Add your own tests to the script to fully test your program
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