Skip to content

Instantly share code, notes, and snippets.

@wynand1004
Created March 25, 2021 00:56
Show Gist options
  • Save wynand1004/6cb9e9727df240df3cbf96483cdafe3b to your computer and use it in GitHub Desktop.
Save wynand1004/6cb9e9727df240df3cbf96483cdafe3b to your computer and use it in GitHub Desktop.
Java Loop Challenge 2 Starter Code
// Java Loop Challenge 2
// By @TokyoEdtech
class JavaLoopChallenge2
{
public static void main(String[] args)
{
System.out.println("\n\n1.");
// Create a loop to print the numbers 1 to 10 inclusive
System.out.println("\n\n2.");
// Create a loop to print the sum of the numbers 1 to 10 inclusive
System.out.println("\n\n3.");
// Create a loop to print the even numbers only from 1 to 20 inclusive
System.out.println("\n\n4.");
// Create a loop to print the sum of the even numbers from only from 1 to 20 inclusive
System.out.println("\n\n5.");
// Create a loop that prints the 2 times table from 0 to 12
System.out.println("\n\n6.");
// Create a loop that prints the 0-12 times tables from 0 to 12
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment