11. Perform 4-letter WORD UNSCRAMBLING i.e. List all possible combinations of 4-letters in a word. Ex: The word 'TEST' can be unscrambled as TEST,TETS,TSET,TSTE,TTSE,TTES,etc. (Beginner)
14. Write a program to SWAP the contents of 3 variables without using the temporary (or extra) variables. (Beginner)
I would appreciate someone giving me slight (!) hints as to what I'm supposed to do.
I think in exercise 11. I will very likely need a loop that prints out the new 4-letter combinations, but thats about it :(
Exercise 14. I really have no idea on what to do (using no 4th variable to save the contents in?!)
greetings
In exercise 11 you'll just have to "play with it" a bit.
In exercise 14, probably the xor operator will be useful to you. At least it used to be with 2-var swapping without a third variable. Or didn't it?
I'll first try my luck with 14. but I still don't get in which way the xor operator would be of any use here :S I mean I can only recognize whether the 3 variables are different from each other with it, right?
//EDIT:
Thought about 11. again and wrote something similar to what I had earlier:
22. Develop a animal classification program base on the animal kingdom. (for practice the use of inhabitant classes).
Can someone explain to me what I'm supposed to do in this exercise? The program is supposed to categorize the animal based on my input, or should I just write classes (like class reptile{})? Also, what are "inhabitant classes"?