How print this series in while loop
square root 1 2 4 8 16 32 64 128..........
and
cube root 2 8 24 72........
umair jameel
0
Newbie Poster
Recommended Answers
Jump to Postby writing a loop and adding a print statement in it:
step 1:
highBorder = readInHighBorder
step 2:
counter = 1
step 3:
while ( counter < highBorder ){
squareRoot = calculateTheSquareRootOfCounter
printSquareRoot
cubeRoot = calculateTheCubeRootOfCounter
printCubeRoot
add1ToCounter
}
All 3 Replies
stultuske
1,116
Posting Maven
Featured Poster
dmanw100
36
Posting Whiz in Training
stultuske
1,116
Posting Maven
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.