I need a head-up on this program....i really don't know where to start....however for section one, i'm guessing we'll have to use for loop from 1000 to 9999...because of the fact that they show the range of the samllest to largest 4 digit #'s. In section two I guess we'd have to set some value from the lowest 2 digit # to the largest 4 digit #. I'll try to start a code and post as soon as I can. The assignment is as follows:
There are two sections to this program.
Section one:
Write a C++ program that determines which four digit numbers meet the following conditions:
Add the first two digits as a number to the last two digits as a number. The square of this sum equals the original number.
Example:
Original number is 4321. Determine if 43 + 21 which equals 63, when squared, is 3969 is equal to the original number (4321).
Section two:
The program continues by determining which 2, 3, and 4 digit numbers are equal to the sum of the cubes of their digits.
Example:
If the original number is 234, determine if 2 cubed (8) + 3 cubed (27) + 4 cubed (64) which is 99 is equal to the original 234.
Thanks for all the help.
zandiago 115 Nearly a Posting Maven Featured Poster
twomers 408 Posting Virtuoso
n.aggel 13 Posting Whiz in Training
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster
vijayan121 1,152 Posting Virtuoso
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster
twomers 408 Posting Virtuoso
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster
n.aggel 13 Posting Whiz in Training
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured Poster
zandiago 115 Nearly a Posting Maven Featured 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.