Skip to content

Instantly share code, notes, and snippets.

View jukbot's full-sized avatar
🏠
Working from home

Juk - a search builder jukbot

🏠
Working from home
  • CalCal
  • Bangkok, Thailand
  • X @jukbot
View GitHub Profile
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);
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);
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);
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;
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);
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();
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++) {
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);
}
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");
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"AdvancedNewFile",
"All Autocomplete",
"AngularJS",