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

  Greatest number of people with the largest security

1. What are the different characteristics between 802.11 b, a, g and n? What Wifi router/access point devices should you choose to handle the greatest number of people with the largest security?

  Information of all the processes pointed by init

Print some information of all the processes pointed by init_task, something similiar to "ps -ef", including UID, PID, PPID, thread name, etc.

  Problem regarding the polynomial-time algorithm

Give a polynomial-time algorithm that ?nds rV/21 vertices that collectively cover at least three-fourths (3/4) of the edges in an arbitrary undirected graph.

  How does the use of the internet, intranets, and extranets

How does the use of the Internet, intranets, and extranets by companies today support their business processes and activities

  Explaining os not designed for smartphones and pdas

which OS is not designed for smartphones and PDAs?1. Which OS is not designed for smartphones and PDAs?

  Find the downward force

The downward force in newtons equals the mass of the child and the swing in kilograms times the acceleration due to gravity (9.8 meters per second squared). If the mass of the child and the tire is 73 kilograms, find the downward force.

  Can a ternary relationship have intersection data

What is a dependent entity? (See the description in the General Hardware example.)

  Describe why suggestion of connecting by twisted pair cable

Describe why you would suggest connecting all current and new client computers using twisted pair cable instead of staying with the current coax wiring structure.

  When problem decomposition is not easy

Consider the development of a simple mobile application that displays personal financial management video clips selected from a central repository. Discuss how you would systematically analyze the requirements of this application and identify its ..

  Personal coming of age experience

A brief story of your personal coming of age experience and how culture was transmitted to you. A brief statement of what the experience meant to you. A brief explanation of the experience in the media or story from coming of age stories that resonat..

  Calculate the reciprocity of the network

For a directed network in which in- and out-degrees are uncorrelated, show that it takes time 0(/m2 / n) to calculate the reciprocity of the network. Why is the restriction to uncorrelated degrees necessary? What could happen if they were correlate..

  Implement a super class person make two classes student

Implement a super class Person. Make two classes, Student and Instructor that inherit from Person. A person has a name and a year of birth. A student has major and the instructor has a salary. Write the class declarations, the constructors, and the m..

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