Produce a c program that prompts a user for two integers


Produce a C program that prompts a user for two integers (ints) and stores the two integers the user types into the console. Print the product, quotient, remainder, sum, and difference of the two integers to the console (see below for formatting). Use the first integer the user enters and print a statement to the console identifying the number as positive, negative, or 0. Only submit the .c file. The format should match the sample runs below.

Sample Run 1:

Enter two numbers: 5 4

5 * 4 = 20

5 / 4 = 1

5 % 4 = 1

5 + 4 = 9

5 - 4 = 1

Your first number is positive.

Sample Run 2:

Enter two numbers: 0 3

0 * 3 = 0

0 / 3 = 0

0 % 3 = 0

0 + 3 = 3

0 - 3 = -3

Your first number is zero.

Sample Run 3:

Enter two numbers: -3 8

-3 * 8 = -24

-3 / 8 = 0

-3 % 8 = -3

-3 + 8 = 5

-3 - 8 = -11

Your first number is negative.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Produce a c program that prompts a user for two integers
Reference No:- TGS02349916

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)