Question
Module 4 Debugging Exercise Please submit your corrections to the debugging exercises in the attached file ( stating out with logic and design). Repetition Structures.
Module 4 Debugging Exercise Please submit your corrections to the debugging exercises in the attached file ( stating out with logic and design). Repetition Structures. find the error, please.
1-Declare Integer product, number
product = 0
While product < 100
Display "Enter a number."
Input number
End While
2- Declare Real num1, num2, sum
Declare String again
Do
Display "Enter a number."
Input num1
Display "Enter another number."
Input num2
Set sum = num1 + num2
Display "Their sum is ", sum
Display "Do you want to do that again? (y=yes)"
Input again
3- Declare Integer num
While num < 10
Display "Enter a number."
Input num
Set num = num + 1
End While
4- Declare Integer year = 1
Declare Integer month = 1
While year < 10
Display This is year , year.
While month < 12
Display This is month , month
End While
Set month = month + 1
Set year = year + 1
End While
5- Declare Integer week = 1
Declare Integer day = 1
While week <= 52
Display This is week , week.
While day <= 8
Display This is day , day
Set day = day + 1
End While
Set week = week + 1
End While
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started