This file contains hidden or 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
| package cg; | |
| import org.fusesource.jansi.Ansi; | |
| import org.fusesource.jansi.AnsiConsole; | |
| /** | |
| * User: Sergey Mashkov | |
| * Date: 6/21/12 | |
| */ | |
| public class Main { |
This file contains hidden or 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
| package testvetor; | |
| /** | |
| * | |
| * @author Gabriel | |
| */ | |
| public class Testvetor { | |
| public static void main(String[] args) { | |
| int a[] = {1, 3, 5, 7}; |
This file contains hidden or 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
| /* | |
| * To change this template, choose Tools | Templates | |
| * and open the template in the editor. | |
| */ | |
| package palindromos; | |
| /** | |
| * | |
| * @author 31371477 |
This file contains hidden or 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
| //those go UP | |
| var zalgo_up = [ | |
| '\u030d', /* Ì */ '\u030e', /* ÌŽ */ '\u0304', /* Ì„ */ '\u0305', /* Ì… */ | |
| '\u033f', /* Ì¿ */ '\u0311', /* Ì‘ */ '\u0306', /* ̆ */ '\u0310', /* Ì */ | |
| '\u0352', /* ͒ */ '\u0357', /* ͗ */ '\u0351', /* ͑ */ '\u0307', /* ̇ */ | |
| '\u0308', /* ̈ */ '\u030a', /* ̊ */ '\u0342', /* ͂ */ '\u0343', /* ̓ */ | |
| '\u0344', /* ÌˆÌ */ '\u034a', /* ÍŠ */ '\u034b', /* Í‹ */ '\u034c', /* ÍŒ */ | |
| '\u0303', /* ̃ */ '\u0302', /* Ì‚ */ '\u030c', /* ÌŒ */ '\u0350', /* Í */ | |
| '\u0300', /* Ì€ */ '\u0301', /* Ì */ '\u030b', /* Ì‹ */ '\u030f', /* Ì */ |
This file contains hidden or 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 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 |
This file contains hidden or 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.*; | |
| public class juncao { | |
| public static void main(String [] args){ | |
| int[] vetA; | |
| int[] vetB; | |
| int[] vetC; | |
| int tamVetor = -1; | |
| do{ |
This file contains hidden or 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.*; | |
| 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; | |
This file contains hidden or 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.*; | |
| 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. | |
This file contains hidden or 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.*; | |
| 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")); |
This file contains hidden or 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.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++){ |