Design a program that asks users for two numbers

Assignment Help Basic Computer Science
Reference no: EM131395749

A permutation is an ordered subset of a set. For example, say you wanted to pick a combination to a vault. There are 60 possible numbers, and you need three different numbers for the combination. There are P(60,3) permutations for the combination, where P is defined by the formula

2179_5736f123-35bc-49f8-9a54-625047e7f733.png

where ! is used as a suffix factorial operator. For example, 4! is 4*3*2*1.
Combinations are similar to permutations, except that the order of the objects doesn't matter. For example, if you were making a "banana split" sundae and wished to use three different flavors of ice cream out of five that you had, you wouldn't care if you used a scoop of vanilla at the beginning or the end; you would still have used vanilla. The formula for combinations is

1298_3c513b88-5c1a-4a78-b7e6-362fe1e9112d.png

Design a program that asks users for two numbers, asks them whether they want to calculate permutations or combinations, and prints out the result. This will have several parts. Do an analysis of the above requirements. Write exactly what the program will have to do. Then, go into the design phase. Write pseudo code for the program, and break it into sub-components. This program should have error checking. Make sure that all erroneous inputs will generate good error messages.

Reference no: EM131395749

Questions Cloud

Novel diagnostic tools and therapeutic targets : In the body first should be introduction including what is breast cancer and statistics in world and srilanka,then epidemiology like about breast cancer , after that about new diagnostic tools why we using new diagnostic tools and what is the diff..
Whether definitions are stipulative or lexical - recession : Determine whether the following definitions are stipulative, lexical, precising, theoretical, or persuasive.- "Recession" means, for purposes of the National Bureau of Economic Research, two consecutive quarters of negative growth in real GNP or in..
What are common miscommunications between men and women : What are common miscommunications between men and women? What are the causes? Provide specific examples of dialogue among genders
Explain the primary manner in which the chosen method is use : Explain the primary manner in which the chosen method is used in database management systems. Describe the impact and alternative of not having the chosen method available to manage concurrency.
Design a program that asks users for two numbers : This program should have error checking. Make sure that all erroneous inputs will generate good error messages.
What is the level of utility : Suppose Nia's utility function is given by the equation U(PC, SM) = 10PC+ 20SM. What combination of PC and SM should Nia buy to maximize her utility? What is the level of utility?
Whether definitions are stipulative or lexical - gravity : Determine whether the following definitions are stipulative, lexical, precising, theoretical, or persuasive.- "Gravity" means a force that results from the universal attraction that every particle of matter has for every other particle.
Choose two macroeconomic issues : Choose two macroeconomic issues that have been in the news this past week. Explain thembriefly (about two paragraphs each) so we can all understand why they have been in thenews. I.e. tell us why we should want to know about them and how they will..
Compare and contrast the different types of idps technology : Compare and contrast the different types of IDPS technology and describe any prior experience using any of the tools.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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