Advertisements
Advertisements
प्रश्न
Following is an algorithm to classify numbers as “Single Digit”, “Double Digit” or “Big”.
Classify_Numbers_Algo
INPUT Number
IF Number < 9
"Single Digit"
Else If Number < 99
"Double Digit"
Else
"Big"
Verify for (5, 9, 47, 99, 100, 200) and correct the algorithm if required.
टीपा लिहा
Advertisements
उत्तर
The correct algorithm is:
INPUT Number
IF Number < 10
"Single Digit"
Else If Number < 100
"Double Digit"
Else
"Big"shaalaa.com
Representation of Algorithms
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
