A positive integer and a subprogram

Assignment Help Basic Computer Science
Reference no: EM13808448

The factorial of a positive integer N, denoted by N!, is defined by the following: N! = 1 * 2 * ..... * N (Note: 0! = 1) Using module and/or functions, create a recursive program to compute N!. The user should input a positive integer and a subprogram should check that the input is correct ( a positive integer). Then use recursion to computer the factorial. Create a subprogram that will call itself to do the multiplication until N = 1. Then display the result in the main program. You must submit both the pseudocode and the flowchart for this assignment. Save your flowchart and pseudocode in the same document (PDF or doc) then drop them into the assignment dropbox. Draw a flowchart and write a pseudocode for the complete program, main module and a subprograms and/or functions. After completing this assignment drop it into the assignment drop box. 

Reference no: EM13808448

Questions Cloud

What is the companys weighted average cost of capital : Dobson Dairies has a capital structure, which consists of 60 percent long-term debt and 40 percent common stock. Assume the firm will be able to use retained earnings to fund the equity portion of its capital budget. What is the company’s weighted av..
What is the net present value of this lockbox arrangement : You are considering implementing a lockbox system for your firm. The system is expected to reduce the average collection time by 2.8 days. On an average day, your firm receives 2,419 checks with an average value of $1,287 each. The daily interest rat..
Difference analysis and market segmentation : Difference analysis and market segmentation? How does a company use difference analysis to determine market segmentation? Give examples.
Powerpoint for world religion : Powerpoint for World Religion
A positive integer and a subprogram : The factorial of a positive integer N, denoted by N!, is defined by the following: N! = 1 * 2 * ..... * N (Note: 0! = 1) Using module and/or functions, create a recursive program to compute N!. The user should input a positive integer and a subprogra..
Decide between two different conveyor belt systems : BOE Manufacturing is trying to decide between two different conveyor belt systems. System A costs $228,000, has a four-year life, and requires $72,000 in pretax annual operating costs. System B costs $324,000, has a six-year life, and requires $66,00..
Evaluating two different silicon wafer milling machines : You are evaluating two different silicon wafer milling machines. The Techron I costs $258,000, has a three-year life, and has pretax operating costs of $69,000 per year. The Techron II costs $450,000, has a five-year life, and has pretax operating co..
Create a class rectangle with attributes length and width : Create a class Rectangle with attributes length and width, each of which defaults to 1. Provide methods that calculate the rectangle's perimeter and area
Critical infrastructure protection : Critical Infrastructure Protection According to the text, Critical Infrastructure Protection (CIP) is an important cybersecurity initiative that requires careful planning and coordination in protecting our infrastructure.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  In the style li b {color: blue}, b is the ____ element.

In the style li b {color: blue}, b is the ____ element.

  Investigation-woman having inappropriate files on computer

Young woman who was fired from her job for inappropriate files discovered on computer, and she swears she never accessed files. What questions must you ask and how should you proceed?

  Explaining responsibility ofconfidentiality to employer

Describe what you must do in such a situation. You know that cost to your present employer will increase if ambiguities are not resolved. Though, you also have a responsibility of confidentiality to previous employer.

  Write a program that prompts the user to input a number

Write a program that prompts the user to input a number. the program should then output the number and a message saying whether the number is positive, negative, or zero

  Writing return statement in a value returning function

What would be wrong with not writing returnstatement in a value returing function? Can you have a returnstatement in a void function? Does the return statement in the following function cause syntax error?

  Implementing the application in cloud environment

Application and present the challenges in implementing the application in cloud environment based on the referred research papers - Enterprise Resource Planning application

  Display the total annual pay on the screen

Display the total annual pay on the screen.

  The u.s. convert to a zero personal income tax

The U.S. Convert to a Zero Personal Income Tax

  Create a new group called mygroup

Directions: As you complete each of the following steps, keep track of what occurs at each point, including what you type, the output given, and if you experience any errors.

  Why computer literacy has become fourth fundamental skill

Explain whether today, computer literacy (knowledge of how to properly use computer and its software applications) has become fourth basic skill.

  The built in python string functions

letterCount(letter, myString) This function should take a single letter, and then a string. It should return the number of times letter occurs in myString. So the call letterCount('h', 'hello') should return 1, and the call letterCount('a', 'aa..

  Explain classic five-stage risc integer pipeline

Assume that the initial value of R3 is R2 + 496. Use the classic five-stage RISC integer pipeline and assume all memory accesses take 1 clock cycle.

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