Numbers and pass them to the function

Assignment Help Basic Computer Science
Reference no: EM131406774

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

Reference no: EM131406774

Questions Cloud

Construct an e-r model for this scenario : Students can book through the agency, while payment is made directly to the resort. Construct an E-R model for this scenario.
Conclusion of instruction : Suppose that the following instructions are found at the given locations in memory a. Show the contents of the IR, the PC, the MAR, the MDR, and A at the conclusion of instruction 20
Optimize database components : Evaluate at least two methods that can be used to optimize database components such as queries, reports SQL transaction processing, and data consumption. Provide a real-world example that explains how these methods would help an organization proce..
Draw an e-r diagram for a patient appointment system : Draw an E-R diagram for a patient appointment system. Consider the entities patient, patient appointment, doctor, prescription, and pharmacy. Identify and depict the cardinality of each relationship. Also identify the attributes and candidate key ..
Numbers and pass them to the function : 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 ..
How many employees can work on a project : Could TOOL be modeled as an associative entity? Why or why not?
Discuss about the federal trade commission : Evaluate how effective the Federal Trade Commission (FTC) has been in protecting consumer privacy and targeting deceptive and unfair trade practices on the Internet. Support your opinion with specifics.From the e-Activity, discuss your reaction t..
Classful and classless types of ip addresses : What are the difference between classful and classless types of IP addresses?
What is the identifier for certificate associative entity : Now, assume that the same employee may take the same course multiple times, on different dates. Does this change your answer to part a? Why or why not?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Determine the security and access privilege procedures

Interview the DBA at your school or at a local business to determine the security and access privilege procedures used to safeguard data, and then document your findings in a report.

  Explain the concept of supply chain management

Explain the concept of supply chain management. Although R/Way offers services rather than products, could that concept apply to the design of R/Way's new system? If so, how?

  Sequential search for an array

With the help of an example prove how a binary search can prove to be more efficient than a sequential search for an array of 10 sorted numbers.

  Do you need to know which methods are abstract

Move the increment Age method from Fox and Rabbit to Animal by providing an abstract getMaxAge method in Animal and concrete versions in Fox and Rabbit.

  Calculate worst-case computational complexity of decision

It is important to calculate the worst-case computational complexity of the decision tree algorithm. Given data set, D, the number of attributes, n, and the number of training tuples, |D|, show that the computational cost of growing a tree is at m..

  Higher standard deviation of the second test

The average test grade rose by one point, the scores of the second test were closer together than the first, the higher standard deviation of the second test indicates higher average scores on the second test than the first, or none of the above a..

  What is the syntax of the inheritance method

What is the syntax of the Inheritance method to extending a base class in C++

  Design requirements or circuit materials

Speaking of Design effort for digital and analog circuits: It might be argued that an offsetting difference is that digital circuits require more transistors than functionally equivalent analog circuits. What makes the biggest difference - desig..

  How many fragments are generated in link that has mtu

How many fragments are generated? What are values in the various fields in IP datagrams generated realted to fragmentaion?

  Unique configuration of the office space

Five (5) of the deployments experienced delays due to the unique configuration of the office space which required modification to install the proper wiring.

  Is this the same in line graphs

Give examples of at least three different bar graphs. What are some of the different ways a second independent variable can be coded in a bar graph? Is this the same in line graphs?

  Describe the combination geometrically

Solve the equation aux + buy + u = 0 with Cauchy data u(s) = e-s along the straight lines (x(s),y(s)) = (cs,ds). The solution breaks down for a particular combination of a,b,c and d. Describe the combination geometrically and explain it in terms o..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd