Created
August 18, 2014 16:23
-
-
Save caiquecastro/b33f3c995e1a33b7dc80 to your computer and use it in GitHub Desktop.
Exercicio Matemática Discreta - Tamanho de Conjuntos
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 class Ex2 { | |
public static void main(String[] args) { | |
Conjunto a = new Conjunto("A"), | |
b = new Conjunto("B"); | |
a.init(); | |
b.init(); | |
int sizeA = a.tamanho(), | |
sizeB = b.tamanho(); | |
System.out.println("|A| = " + sizeA); | |
System.out.println("|B| = " + sizeA); | |
System.out.printf("|2^A| = %.0f\n", Math.pow(2, sizeA)); | |
System.out.println("|A x B| = " + sizeA * sizeB); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment