Please help me i need to know the simple way to answer this program without using recursion.
3. Save the ff. data into a different array.
Smart: 0907, 0908, 0909, 0910, 0912, 0918, 0919, 0920, 0921, 0928, 0929, 0930, 0938, 0939, 0946, 0947, 0948, 0949, 0989, 0999, 0998, 0937
Globe: 0905, 0906, 0915, 0916, 0917, 0926, 0927, 0935, 0936, 0996, 0997, 0975, 0977
Sun: 0922, 0923, 0925, 0932, 0933, 0934, 0942, 0943
The user will be asked to enter a mobile number (e.g. 09181234567) and the program will identify which Telecom (i.e. Smart Globe, Sun) owns the number. The mobile number will also be validated. If its character length is not 11, the program will display “The mobile number must be 11 digits long” If the mobile number contains a letter or symbol (e.g. 0918a234567), the program will display “The mobile number is not valid”. If the mobile number is not belonging to any of the telecoms, the program will display “The entry is not a Smart/Globe/Sun number”. You may only telecom prefixes (e.g. 0907, 0908, 0917) must be read from the array.
Sample Run:
Enter a mobile number:
Input Output
09182456187 The mobile number is a Smart number.
09175879654 The mobile number is a Globe number.
09224874787 The mobile number is a Sun number.
09008785465 The entry is not a Smart/Globe/Sun number.
091045742a7 The mobile number is not valid.
09124587 The mobile number must be 11 digits long.