answersLogoWhite

0

A flowchart for a program that accepts and displays the factorial of a number would include the following steps: Start, Input the number, Initialize a variable for the factorial, Use a loop to calculate the factorial by multiplying the variable by each integer up to the number, Output the result, and End.

Pseudocode for the same program would look like this:

START
  INPUT number
  factorial = 1
  FOR i FROM 1 TO number DO
    factorial = factorial * i
  END FOR
  OUTPUT factorial
END
User Avatar

AnswerBot

5d ago

What else can I help you with?

Related Questions

Develop an algorithm to display all prime numbers from 2 to 100 Give both the pseudocode version and the flowchart version Convert your pseudocode into a Java program?

Develop an algorithm to display all prime numbers from 2 to 100. Give both the pseudocode version and the flowchart version. Convert your pseudocode into a Java program.


How do you write a pseudocode program that commutes and displays a 15 percent tip when you input the price of the meal?

input price calc tip = price*0.15 print tip


What is a program flow chart?

A diagramwhich uses a set of standardsymbols to represent the sequence of operations of a computer program. Such a chart may show, for instance, the steps of a subroutine. Also spelled programflowchart. Also called program flow diagram.


Define flowchart and draw flowchart for GCD of two numbers?

pictorial representation of a program is called a flowchart


What is the Difference between program and flowchart?

Flowchart it is diagrammatic Program it is coding. A flowchart is drawn out on paper, and shows the logic of an if/then/else statement. The programming actually is the if/then/else, not just the logic.


Why is the interactive Visual Logic flowchart program more useful than a manually drawn flowchart?

A manual flowchart is static. The advantage of an interactive Visual Logic flowchart is that it allows users to input values for various variables at runtime. When the flowchart is finished, users can then run the program behind the chart.


A program for simple factorial in prolog?

In Prolog, a simple factorial program can be defined using recursion. Here's a basic implementation: factorial(0, 1). % Base case: factorial of 0 is 1 factorial(N, Result) :- N > 0, N1 is N - 1, factorial(N1, Result1), Result is N * Result1. % Recursive case You can query the factorial of a number by calling factorial(N, Result). where N is the number you want to compute the factorial for.


What is an English-like statement used to describe the logic of a program?

Pseudocode.


What is the algorithm n flowchart for calculating factorial of number using recursion?

A flowchart for factorial of number can be made using different software's. Microsoft Word is the most popular software for beginners to make simple flowcharts.In order to draw the flowchart write the number at the top of the paper and then draw two lines under it going slightly to the sides. Decide what two numbers can be multiplied to equal that number. Keep going until you can no longer get to smaller numbers.


What has the author T E Bailey written?

T. E. Bailey has written: 'Program design with pseudocode' -- subject(s): Programming, Electronic digital computers, Electronic digitalcomputer, Pseudocode (Computer program language)


How do you write a pseudocode program for finding out x to the power of y?

X**y


What shows the logical flow of a program?

Construct/Control