hi! i am trying to write a program that takes a long integer and compares every pair in that integer and displays largest pair. e.g we have an integer 23812 and in this integer largest pair is 81. so program should display 81. but i have no logic in mind for this program. please help me
hAbbas 0 Newbie Poster
Recommended Answers
Jump to Post
- Convert number to string.
- Create array of pairs in the string.
- Convert array members to integers.
- Iterate array to find largest member.
Jump to PostSorry, but I don't do your homework for you. I provided a pseudo-code algorithm to solve the problem. Write the code, and post it here with errors that you encounter. Then we may be able to help.
All 5 Replies
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
Saboor880 9 Junior Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
uonsin -2 Newbie Poster
cheryllocascio 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.