This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class GCD { | |
public static void main (String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Give me 2 numbers for GCD question: "); | |
int x = input.nextInt(); | |
int y = input.nextInt(); | |
int z = euclidgcd(x,y); | |
System.out.println("GCD of " + x + " and " + y + " are " + z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class GCD { | |
public static void main (String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Give me 2 numbers for GCD question: "); | |
int x = input.nextInt(); | |
int y = input.nextInt(); | |
int z = recursive_euclidgcd(x,y); | |
System.out.println("GCD of " + x + " and " + y + " are " + z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class GCD { | |
public static void main (String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Give me 2 numbers for GCD question: "); | |
int x = input.nextInt(); | |
int y = input.nextInt(); | |
int z = gcdboy(x,y); | |
System.out.println("GCD of " + x + " and " + y + " are " + z); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.ActionEvent; | |
import java.awt.event.ActionListener; | |
import java.text.SimpleDateFormat; | |
public class MyNewClock extends JFrame implements ActionListener { | |
JLabel label; | |
JButton button; | |
JButton button2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Stack; | |
public class ReverseStack { | |
public static void main(String[] args) { | |
Stack<Integer> stack = new Stack<Integer>(); | |
stack.push(5); | |
stack.push(4); | |
stack.push(3); | |
stack.push(2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
import java.util.Scanner; | |
public class Random { | |
public static void main(String[] args) { | |
Random rand = newRandom(); | |
int a = rand.nextInt(9); | |
int b = rand.nextInt(9); | |
System.out.println ("What is the answer of" a "+" b); | |
Scanner sc = new Scanner(System.in); | |
c = sc.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ASCIItable | |
{ | |
public static void main(String[] args) { | |
final char EXCLAIM = '!'; | |
final char TILDE = '~'; | |
char c = (char) 0; | |
int row =0; | |
while( c <= TILDE) { | |
System.out.printf("%4d", row++); | |
for(int i =0; i < 10; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ASCII | |
{ | |
public static void main(String[] args) { | |
System.out.print("ASCII Character"); | |
for(int j = 32;j <126; j++) { | |
char i = (char)j; | |
System.out.println(j +" " + i); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class FunHexadecimal{ | |
public static String letShift(String str , int n){ | |
Scanner in = new Scanner(System.in); | |
int time; | |
switch(n) | |
{ | |
case 0 : System.out.println("Why you don't play?"); | |
break; | |
case 1 : System.out.println("Please input time you wand to shift"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bootstrapped": true, | |
"in_process_packages": | |
[ | |
], | |
"installed_packages": | |
[ | |
"AdvancedNewFile", | |
"All Autocomplete", | |
"AngularJS", |