Flowchart for x raised to the power of y
Introduction
In this tutorial, we will design flowchart for x raised to the power of y. Mathematically, we can denote the result as
Result = x*x … *x ( upto y times )
Pseudocode
/** * NAME:www.TestingDocs.com * DATE: * FILE: * COMMENTS: */ START // declare variables x =0; y =0; Prompt = "Enter x"; Input x ; Prompt = "Enter y"; Input y; Print("x=" + x); Print("y=" + y); count = 1; result = 1; while (count > y) { result = result * x; count = count + 1; } Print("x^y =" + result); END
Flowchart
Output:
x=2
y=6
x^y =64