-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenu.java
More file actions
32 lines (22 loc) · 889 Bytes
/
Menu.java
File metadata and controls
32 lines (22 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.util.Scanner;
import java.util.ArrayList;
public class Menu {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
Funciones fn = new Funciones();
System.out.println("Ingrese un numero binario de 8 bits positivo");
System.out.println("Ingresara numero por numero, sea cuidadoso");
for (int i = 0; i < 8; i++) {
System.out.println("Ingrese el digito " + i);
int num1 = sc.nextInt();
fn.getNum().add(num1);
}
System.out.println("En magnitud y signo: ");
System.out.println(fn.magnitudSigno());
String n1 = fn.ceroauno();
System.out.println("En complemento a2: ");
System.out.println(fn.C2(n1));
// System.out.println("En decimal: ");
// System.out.println(fn.bin2(n1));
}
}