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

  How are they perceived and evaluated subjectively

Based on experiments, determine which similarity measures (dot product or Hamming) can better predict which patterns will be reproduced well by a network and which will pose problems?

  Why are timestamps used in the kerberos protocol

1. Why are timestamps used in the Kerberos protocol?

  Estimate the order and the cutoff frequencies

An elliptic bandstop filter is to be designed. It should fulfill the following specifications

  Ols estimates of the ß coefficients

yt = β0 + β1xt + β2xt-1 + β3xt-2 + β4zt-1 + ut 1) True, false, explain: OLS estimates of the β coefficients of this model will be biased if xt is correlated with xt-1  2)  True, false, explain: OLS estimates of the β coefficients of this model will..

  How many bits are in each part include

Label all lines and show how many bits are in each part include how number of bits for offsets, etc are calculated please.

  What is the disadvantage of the zero-forcing detection

What is the statistics of the noise after applying the zero-forcing detection?

  Developing an input design

Explain what principle you believe is the MOST essential in developing an input design, and justify your choice.

  Determine the amount of entropy produced

An electric water heater having a 100 liter capacity employs an electric resistor to heat water from 18 to 60°C.

  Write arbitrary messages to the system log file

write arbitrary messages to the system log file.

  Summary of everything

This final section is a summary of everything you have learned about your company.  Briefly recap what you have learned, and state your opinion on whether or not the stock in the company would be a good investment and why or why not based on:

  Write a two- to three-page paper describing the differences

Write a two- to three-page paper describing the differences.

  How far is the fire from the base of the tower

A fire is sighted from a fire tower in Wayne National Forest in Ohio. The ranger found that the angle of depression to the fire is 22°. If the tower is 75 meters tall, how far is the fire from the base of the tower?

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