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

  Write algorithm to locate the first occurrence of name jean

Write an algorithm to locate the first occurrence of the name JEAN in a list of names arranged in random order. .how you could improve the algorithm if the list of names were arranged in alphabetical order.

  Give the average number of byte-order conversions needed

Give the average number of byte-order conversions needed for both big-endian network byte order and receiver-makes-right, for p = 0.1, p = 0.5, and p = 0.9.

  How much physical memory is needed for storing page table

For a single-level page table, how many page table entries (PTEs) are needed? How much physical memory is needed for storing the page table?

  What transport protocols are used in the applications

Explain how SOAP, RPC, HTTP, and XML are used in inter-process communications. Provide sufficient details to distinguish each protocol.

  Design and implement a money class for calculations

Represent a monetary amount as a number of cents in a long int, but input and output as dollars and cents, e.g., $123.45. Do not worry about amounts that don't fit into a long int.

  Reasonable expectation of privacy

The 4th Amendment protection against unreasonable search and seizure has been jealously guarded for over 200 years. Consequently, all Americans are entitled to a reasonable expectation of privacy.

  Given a scanner of double values

public double[] stats(Scanner scanner) Given a Scanner of double values, return an array of capacity three that has the maximum value in the Scanner as the value in result[0]

  Introduction to information systems

Complete the On Your Own project (PC or Mac version) according to the project instructions and submit your assignment through the online course shell.

  How the identity of users should be managed has been address

A network of wireless access which is provided in a nationwide network of hotels;

  How many would you expect to be nearsighted

Vision. It is generally believed that nearsightedness affects about 12% of all children. A school district tests the vision of 169 incoming kindergarten children. How many would you expect to be nearsighted? With what standard deviation?

  Calculates the factorial of its integer argument

(On many systems, you must use a value of 16 or lower to achieve correct results; the factorial of higher numbers is larger than the value that can be stored in an integer.) Save the file as Factorial.cpp.

  Compute the chromatic number of graphs

Give a linear algorithm to compute the chromatic number of graphs where each vertex has degree at most 2. Must such graphs be bipartite?

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