Write a c function called compare numbers to compare two


Write a C# function called Compare Numbers to compare two numbers and return a code that indicates their relationship: 0 if they are equal, 1 if the first number is larger, and -1 if the first number is smaller. Your main module should prompt the user for the two numbers and pass them to the function. The result is printed in your main module.

The output should look like this (note that it should work for any values that are input; these are just examples).

Enter a number: 10

Enter a number: 21

10 is smaller than 21

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a c function called compare numbers to compare two
Reference No:- TGS02203402

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)