First, you have to extract the individual digits from the original value of b so that they can be added together. Do that in a loop using the mod operator % to extract the right-most digit then divide by 10 to shift all digits right
int x = 0;
int b = 01234;
x += b % 10; // get right-most digit and save in x
b /= 10; // truncate right-most digit
once you get that working for both b and h come back and we'll work on the rest of the problem (unless of course you can do it yourself)
int b = 8, h = 14;
h+= b % 14;
b /= 14;
for( counter= 1; counter <= 14; counter++);
if (h <=8 && b <=14)
Nor appreciating that every time you see something like
" Last edited by Ancient Dragon : 39 Minutes Ago at 13:22. Reason: add code tags"
it represents time sucked away from helping people and instead wasted on doing what the poster should manage for themselves.
> for( counter= 1; counter <= 14; counter++)[B];[/B] Guess what the last ; on this line does.
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...