Dr Shah is a highly superstitious fellow. He is such a nutjob, he pays visits to his numerologist every month! The numer

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Dr Shah is a highly superstitious fellow. He is such a nutjob, he pays visits to his numerologist every month! The numer

Post by answerhappygod »

Dr Shah Is A Highly Superstitious Fellow He Is Such A Nutjob He Pays Visits To His Numerologist Every Month The Numer 1
Dr Shah Is A Highly Superstitious Fellow He Is Such A Nutjob He Pays Visits To His Numerologist Every Month The Numer 1 (409.77 KiB) Viewed 12 times
Need code in C.
Dr Shah is a highly superstitious fellow. He is such a nutjob, he pays visits to his numerologist every month! The numerologist is a troll and gives Dr Shah random advice upon every visit and charges him a bomb. Once the numerologist gave him two digits m & n and recommended that Dr Shah should avoid all numbers that contain these two digits. This essentially means Dr Shah avoid Tickets, currency notes, listing calls from such phone numbers, boarding vehicles etc that have these numbers on them!! For Dr Shah, a number is called a favorable number if it does not contain the digits m & n. For example, suppose m = 3, n = 2 45617 would be a favourable number, where as 49993 and 4299 are not. In fact, the first 20 numbers that do not contain m = 3, n = 2 are: 1, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 40, 41, 44, 45, 46 we say 46 is the 20th favorable number for m = 3, n = 2. Write a C program that take values for s m & n and N as inputs, and outputs the Nth favorable number. Example 1: Input: 34 300 where: m = 3, n = 4, N = 300 Output: 676 Explanation: because 676 is 300th number that does not contain 3 or 4. Example 2: Input: 01 999 Output: 2858 constraints: 0<N< 10000000
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply