Skip to content

Instantly share code, notes, and snippets.

View sanabanana-png's full-sized avatar

julia haligowska sanabanana-png

  • seattle
View GitHub Profile
import java.util.*; // to use Scanner
public class Birthday {
public static void main(String args[]) {
Scanner console = new Scanner(System.in); //"spawning" in the scanner
intro();
System.out.println("Please enter today's date:");
System.out.println("What is the month (1-12)?");
// Julia Haligowska
// 2022-01-13
// CSE 142 AP CS A
// Birthday.java
//
// This program will calculate how many days are left until your next birthday (not including leap year), and will tell you a fun fact about my birthday at the end.
import java.util.*; // to use Scanner
public class Birthday {
import java.util.Random;
import java.util.*;
public class inputRandomGame {
public static void main(String[] args) {
intro();
gameMechanic();
ask();
}
public static void ask() {
System.out.println("Do you want to play again? (y/n)");
import java.util.Random;
import java.util.*;
public class inputRandomGame {
public static void main(String[] args) {
intro();
gameMechanic();
}
public static void looper(){
System.out.println("Would you like to play again?(y/n)");
Scanner ask = new Scanner(System.in);
public class ex53 {
public static void main(String[] args) {
printGrid(3, 6);
}
public static void printGrid(int rows, int cols) {
for (int line = 1; line <= rows; line++) {
for (int lineNum = line; lineNum <= (rows*cols) - rows; lineNum = lineNum + rows) {
System.out.print(lineNum);
System.out.print(", ");