I got it working. Thanks for the help!
Type: Posts; User: RyanT
I got it working. Thanks for the help!
name1length and namelength are both determined by the name entered. The same goes for name and name1, but I have longest being determined in those if statements. Which ever name is longer is supposed...
if (name1length>namelength){
longest=name1;
}
if (namelength>name1length){
longest=name;
}
Those are my if statements, and I can't really explain why it doesn't work. It is like my program...
I tried to save the longest one using the if statement, but it doesn't work so I guess I did something wrong with it. Is there any other way I could do it?
I have to make a program that asks the user for a list of names, and then displays the number of names asked and the longest name in capital letters.
So far, this is what I have:
public class...