1.) Finish up your Fewest Coins Possible code
2.) Explore and experiment with the code below. What is it doing? How does it work? Can you change it?
This is an interesting use of formatting and a "for loop" as well as the ++ option to count up. Let's look at how it works:
public class Alphabet
{
public static void main(String [] args)
{
char current = 'A';
for(int row = 1; row <= 3; row++)
{
for(int column = 1; column <= 10; column++)
{
System.out.print(current + " ");
current++;
}
System.out.println();
}
}
}
No comments:
Post a Comment