An integer number is called special number if it is a three digit number and contains 9 in its digits. Write an algorithm OR Flowchart for checking that given number is special number or not. (ex. 198, 910, 399 are special numbers and 6, 34, 215, 7842 are not special numbers).
Answers
Answered by
1
Your algorithm should look something like
for digit in number:
count number of digit
if number of digit = 3
for digit in number
if digit = 9
return "Special Number"
else
return "Not a Special Number"
else
return "Not a Special Number"
Similar questions