Faça um algoritmo para ler dois números inteiros e informar se estes são iguais ou diferentes.
Soluções para a tarefa
Respondido por
3
Resposta:
import java.util.Scanner;
public class teste {
public static void main (String[]args) {
Scanner t = new Scanner(System.in);
int a = t.nextInt();
int b = t.nextInt();
if(a == b) {
System.out.println("São iguais");
}else {
System.out.println("Não são iguais");
}
}
}
Perguntas interessantes
Matemática,
5 meses atrás
Matemática,
5 meses atrás
Sociologia,
5 meses atrás
Biologia,
8 meses atrás
Português,
8 meses atrás
Geografia,
11 meses atrás
Matemática,
11 meses atrás