0% found this document useful (0 votes)
5 views

Algorithm Workbench

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Algorithm Workbench

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Start

Declare Integer num, product


product=0

While product <100


Display "Enter a number: "
Input num
Set product= num * 10
Display "The number entered was", num

Display "The product is", product


End While
End
Start
Declare Integer num1, num2, sum
Declare String keepGoing="y"

Do
Display "Enter the first number:"
Input num1
Display "Enter the second number:"
Input num2
Set sum= num1 + num2
Display "The sum is: ", sum
Display "Do you want to repeat the operation?"
Display "(Enter y for yes.)"
Input keepGoing
While keepGoing == "y"
End
Start
Declare Integer i
Constant Integer maxValue=1000

For i=0 to maxValue Step 10


Display i
End For
End
Start
Declare Integer i, total, num
Set total=0

For i=1 To 10 Step 1


Display "Enter a number: "
Input num
Set total += num
Display "Total is: ", total
End For
Display "The total of the 10 numbers is: ", total
End
Start
Declare Integer i
Declare Real total
Set total = 0.0

For i = 1 To 30
Set total = total + (i /(31-i))
Display "The total is: ", total
End For
Display "The total of the series is: ", total
End
Start
Declare Integer row, col

For row= 1 To 10
For col = 1 To 15
Display "#"
End For
Display "" //newline
End For
End
Start
Declare Integer x=1
Do
Display "Enter a number:"
Input x
While x > 0
End
Start
Declare String sure
While sure != "Y" AND sure != "y"
Display "Are you sure you want to quit?"
Input sure
End While
End
Start
Declare Integer count

For count = 0 To 49
Display "The count is ", count
End For
Start
Declare Integer count= 1

While count <= 50


Display count
Set count= count + 1
End While
End

You might also like