Skip to content

Instantly share code, notes, and snippets.

@urankajtazaj
urankajtazaj / RomanToDecimal.java
Last active September 13, 2018 10:08
Roman to Arabic numbers
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
class RomanToDecimal {
private static Scanner input = new Scanner(System.in);
private static List<Character> romanChars = new LinkedList<>();
public class Main {
public static void main(String[] args) {
Tree tree = new Tree();
tree.add(8);
tree.add(2);
tree.add(3);
tree.add(9);
tree.add(6);
tree.add(1);
tree.add(4);
public class Node {
int value;
Node left, right;
Node(int value) {
this.value = value;
left = null;
right = null;
}
public class Tree {
Node root;
public void add(int value) {
root = add(root, value);
}
public void remove(int value) {
root = remove(root, value);
}
import java.util.Scanner;
public class Hipotenuza {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int a, b, c;
System.out.println("************************\nKalkulimi i hipotenuzes\n************************");
System.out.print("a: ");
a = input.nextInt();
import java.util.Scanner;
public class MinMaxAvg {
public static void main(String[] args) {
int minNumra = 20, maxNumra = 180;
Scanner input = new Scanner(System.in);
int[] userNumbers = new int[20];
System.out.println("Shkruani 20 numra:");
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class NumeroFjalet {
static int max = 10;
static List<Character> endsWith = new ArrayList();
static String flag = "END";
package sample;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.HBox;
import javafx.scene.shape.Rectangle;