Question: Develop a set of test cases manually (test code not asked) that will adequately test the while loop in the below pseudocode that counts

Develop a set of test cases manually (test code not asked) that 

Develop a set of test cases manually (test code not asked) that will adequately test the while loop in the below pseudocode that counts the number of digits in a number and finds the sum of those digits. Text that follows two forward slashes // in below pseudocode is a comment. Flow graph is not needed. 123 3 45 //count the number of digits in a number (num) and sum the digits INPUT num digits sum = 0 6 7 8 00 9 10 11 12 13 14 15 16 11 //receive input from user and store in num //count of digits in a number //sum of digits in a number while(num > 0) begin valueOfDigit = num modulus 10 //mod num by 10 sum = sum + valueOfDigit num roundDown (num / 10) //divide num by 10 digits = digits + 1 end while print(digits) print(sum)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!