Skip to content

Instantly share code, notes, and snippets.

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

Gabriel Melo Correia gmfc

🏠
Working from home
View GitHub Profile
import javax.swing.*;
public class rand {
public static void main(String[] args) {
//Xf=(a*Xi+b)%m;
double a = 752395;
double Xi;
double m = 254;
double b = 25;
double Xf;
import javax.swing.*;
import java.io.FileWriter;
import java.io.IOException;
public class rand {
public static void main(String[] args) {
//Xf=(a*Xi+b)%m;
double a = 752395;
double Xi;
import javax.swing.*;
import java.io.FileWriter;
import java.io.IOException;
public class rand {
public static void main(String[] args) {
//Xf=(a*Xi+b)%m;
double a = 25136;
double Xi;
import javax.swing.*;
import java.io.FileWriter;
import java.io.IOException;
public class randd {
public static void main(String []args){
double seed,Xi,Xf;
double[] vetor;
int t;
import javax.swing.JOptionPane;
public class Vetores2 {
public static void main(String[] args) {
int a[] = {3, 10, 4, 2, 8};
int[] b = {10, 4, 12, 3, 23, 1, 8};
int[] c = new int[(int)Math.min(a.length, b.length)];
int i=0;
for(int f=0;f<a.length;f++){
for(int k=0;k<b.length;k++){
@gmfc
gmfc / aula22.java
Last active December 17, 2015 18:59
import javax.swing.*;
class prog{
public static void main(String args[]){
int[] v1;
int[] v2;
int tamanho;
do{
tamanho = Integer.parseInt(JOptionPane.showInputDialog("Entre com o tamanho do vetor 1"));
import java.util.*;
class matriz{
public static void main(String[] args){
Scanner s = new Scanner(System.in);//Scanner inicializado em s
int[] vetor;//Vetor principal
String[] entrada;//Vetor de entrada
entrada = s.nextLine().split(" ");//Reparte a entrada e coloca no vetor de entrada separando por espaços.
import javax.swing.*;
public class coord {
//Xf=(a*Xi+b)%m;
public static double seed = 1;
public static double a = 179424361;
public static double b = 11;
public static double m = 1000000000;
public static double dNom = 100000;
public static double[][] matriz;
@gmfc
gmfc / estudo.java
Last active December 18, 2015 07:09
estudo.java
import javax.swing.*;
public class juncao {
public static void main(String [] args){
int[] vetA;
int[] vetB;
int[] vetC;
int tamVetor = -1;
do{
public static int[] merge(Comparable[] arg1, Comparable[] arg2)
{
//convert arrays to collections (lists)
Collection coll1 = Arrays.asList(arg1);
Collection coll2 = Arrays.asList(arg2);
//Create a SortedSet from the first collection
SortedSet sorter = new TreeSet(coll1);
//Add the second collection