0 Members and 6 Guests are viewing this topic.
import java.util.*;public class randomcalc{ public static void main(String args[]) { Random generator = new Random(); int r = generator.nextInt(20); System.out.println("yeongJIN_COOL's random calc gen"); System.out.println("You get...");//WHAT YOU'RE GONNA GET? switch(r) { case 0: System.out.println("TI-81");break; case 1: System.out.println("TI-83+");break; case 2: System.out.println("TI-84+");break; case 3: System.out.println("TI-83+ SE");break; case 4: System.out.println("TI-84+ SE");break; case 5: System.out.println("TI-86");break; case 6: System.out.println("TI-89");break; case 7: System.out.println("TI-89 Titanium");break; case 8: System.out.println("TI-92");break; case 9: System.out.println("Voyage 200");break; case 10: System.out.println("TI-32 stuff");break; case 11: System.out.println("f(x)-9750g");break; case 12: System.out.println("cf(x)-9750g");break;//AT LEAST, IT HAS COLOR case 13: System.out.println("TI-MICROWAVE");break;//ROFL case 14: System.out.println("CASIO PRIZM");break; case 15: System.out.println("TI-nSPIRE with Clickpad");break; case 16: System.out.println("TI-nSPIRE with Touchpad");break; case 17: System.out.println("TI-nSPIRE CAS");break; case 18: System.out.println("Wabbitemu");break; case 19: System.out.println("Nothing");break;//TOO BAD FOR YOU }}}
import java.util.Scanner;public class Solve{ static double[][] matrix; public static void main(String[] args){ Scanner reader = new Scanner(System.in); System.out.print("# of variables: "); int vars = reader.nextInt(); inputValues(vars,vars+1); for(int col = 0; col < vars; col++){ for(int row = 0; row < vars; row++){ if(row==0) matrix[col] = rowDiv(matrix[col],matrix[col][col]); if(row!=col) matrix[row] = rowAdd(rowDiv(matrix[col],-1/matrix[row][col]),matrix[row]); } } for(int i = 0; i < vars; i++) System.out.println("xyzuvw".substring(i,i+1) + "= " + Math.round(matrix[i][vars]*1000)/1000.0); } public static void inputValues(int rows, int columns){ String equ = "Ax+By+Cz+Du+Ev+Fw".substring(0,rows*3-1) + "=" + "ABCDEFG".substring(rows,rows+1); matrix = new double[rows][columns]; Scanner reader = new Scanner(System.in); for(int r = 0; r < rows; r++){ System.out.println("Enter equation " + (r+1) + ": \n" + equ); for(int c = 0; c < columns; c++){//C++ System.out.print("ABCDEFG".substring(c,c+1)+"= "); matrix[r][c] = reader.nextInt(); } System.out.println(); } } public static double[] rowDiv(double[] r, double c ){ double[] temp = new double[r.length]; for(int p = 0; p < r.length; p++) temp[p] = r[p] / c; return temp; } public static double[] rowAdd(double[] i, double[] j){ double[] temp = new double[i.length]; for(int p = 0; p < i.length; p++) temp[p] = i[p] + j[p]; return temp; }}
lol that's not simple
I don't even know how to put graphic on java...