Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

just use C language. Don't use C++. Ultra Magic Numbers are the numbers that look same from beginning to the end and from end to

image text in transcribed

image text in transcribed

image text in transcribed

just use C language. Don't use C++.

Ultra Magic Numbers are the numbers that look same from beginning to the end and from end to the beginning with no repeating numbers and have digits more than two. To give some examples 202, 423324 and 818 are some ultra magic numbers but 333 or 11111 are not Some more examples about the ultra magic numbers (UMN): 10001 is a UMN because when you cut the number from half as 10 - 0 - 01 there is no repeating numbers. However, 22722 is not a UMN because 2s are repeated in 22 - 7 - 22. For 3 digit numbers like 111, 222 or 555, this rule is constricted as given in the example below. They are not UMN. In this question, you are expected to find all ultra magic numbers in a range starting from 100 to N where N is an input from the user. N must be a positive integer value. If not print the "Upper bound can not be negative." message. Also N number which is less than 3 digits case must be dealt with as given in example below. After each consecutive 9 ultra magic numbers are printed, the next 9 should be printed on the next line. After printing all the ultra magic numbers in the range, the total number should be printed as well. Hint: Please be careful about the messages on the output of the example. If you think your algorithm works but you got red screen, probably you misspell something in the output screen. For example: Input Result 1800 Please enter an upper bound: 1800 101 121 131 141 151 161 171 181 191 202 212 232 242 252 262 272 282 292 303 313 323 343 353 363 373 383 393 404 414 424 434 454 464 474 484 494 505 515 525 535 545 565 575 585 595 606 616 626 636 646 656 676 686 696 707 717 727 737 747 757 767 787 797 808 818 828 838 848 858 868 878 898 909 919 929 939 949 959 969 979 989 1001 1221 1331 1441 1551 1661 1771 There are 88 ultra magic numbers up to 1800. -5661 Please enter an upper bound: -5661 Upper bound can not be negative. 0 Please enter an upper bound: There are 0 ultra magic numbers up to 0. a Some more examples about the ultra magic numbers (UMN): 10001 is a UMN because when you cut the number from half as 10 - 0 - 01 there is no repeating numbers. However, 22722 is not a UMN because 2s are repeated in 22 - 7 - 22. For 3 digit numbers like 111, 222 or 555, this rule is constricted as given in the example below. They are not UMN

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

Classify delivery styles by type.

Answered: 1 week ago