Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. How do people respond to cultural diff erences in communication?

Answered: 1 week ago

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago