Computer Science  >  Solutions Guide  >  Gwinnett Technical College - CIST 1305Lesson_07_Homework_MuhammadRahman Algorithm Workbench SOLUTIO (All)

Gwinnett Technical College - CIST 1305Lesson_07_Homework_MuhammadRahman Algorithm Workbench SOLUTIONS ( UPDATED )

Document Content and Description Below

Algorithm Workbench 1. Design a ‘While’ loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named ‘product’. The loop should it ... erate as long as ‘product’ contains a value less than 100. Solution: Module main() Declare Integer product = 0 Declare Integer num = 0 While product < 100 Display "Enter a number: " Input num product = num * 10 Display "Product: " , product End While End Module 2. Design a 'Do-While' loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate. Solution: Module main() Declare Integer num1 = 0 Declare Integer num2 = 0 Declare Integer sum = 0 Declare String response Do Display "Enter first number: " Input num1 Display "Enter second number: " Input num2 sum = num1 + num2 Display "The sum is: " , sum Display "Enter Y to continue: " Input response While response == "Y" End Module 3. Design a 'For' loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50... 1000 Solution: Module main() Declare Integer counter = 0 For counter = 0 To 1000 Step 10 [Show More]

Last updated: 3 years ago

Preview 1 out of 6 pages

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)
Preview image of Gwinnett Technical College - CIST 1305Lesson_07_Homework_MuhammadRahman  Algorithm Workbench SOLUTIONS ( UPDATED ) document

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Reviews( 0 )

$7.00

Buy Now

We Accept:

Payment methods accepted on Scholarfriends (We Accept)

Instant download

Can't find what you want? Try our AI powered Search

140
0

Document information


Connected school, study & course


About the document


Uploaded On

Mar 25, 2021

Number of pages

6

Written in

All

Seller


Profile illustration for Muchiri
Muchiri

Member since 4 years

209 Documents Sold

Reviews Received
19
5
1
1
6
Additional information

This document has been written for:

Uploaded

Mar 25, 2021

Downloads

 0

Views

 140

Document Keyword Tags

Recommended For You

Get more on Solutions Guide »

$7.00
What is Scholarfriends

Scholarfriends.com Online Platform by Browsegrades Inc. 651N South Broad St, Middletown DE. United States.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·