Product of first n natural numbers-algorithm, Basic Computer Science

Product of first n natural numbers - Algorithm

Working Procedure :

1. Take n = 8
2. Take I = 1
3. Take PROD = 1
4. Compute PROD = PROD * 1
5. add 1 to 1
6. If I≤ n, complete the steps from 4 to 6
7. Else, Print the value of PROD
8. Stop

2271_flow chart2.png

Posted Date: 8/29/2012 4:24:30 AM | Location : United States







Related Discussions:- Product of first n natural numbers-algorithm, Assignment Help, Ask Question on Product of first n natural numbers-algorithm, Get Answer, Expert's Help, Product of first n natural numbers-algorithm Discussions

Write discussion on Product of first n natural numbers-algorithm
Your posts are moderated
Related Questions
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

how does one create a database in mysql

#queA register is a memory location surrounded by the CPU itself, designed to be rapidly accessed for purposes of fast data retrieval. Processors normally hold a register array, wh

Memory : Computers store information internally as well as externally. Linked to CPU is an internal memory unit where all the instructions and data are stored. It contains the

Greedy Search-artificial intelligence: If we have a heuristic function for states, as defined above, then we may simply measure each state with respect to this measure an


Description A semaphore is a confined variable whose value can be accessed and changed only by the operations P and V and initialization operation known as ''Semaphoiinitislize''.

Problem 1. What are Micro-operations? Explain Micro operations of the Fetch cycle. Defining Micro-operations Its explanation of the fetch cycle 2. Differen

Please what is the different between computer science and information technology? Which of this require too much reading? Thanks

Question 1 Explain boundary fill and flood fill polygon filling algorithm Question 2 Draw and explain the block diagram of typical workstation Question 3 Explain the ras