Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 18, 2020 04:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save parzibyte/bfbc718c2572bc2a24207fcab62c85aa to your computer and use it in GitHub Desktop.
Save parzibyte/bfbc718c2572bc2a24207fcab62c85aa to your computer and use it in GitHub Desktop.
Scanner sc = new Scanner(System.in);
int numero, multiplo;
System.out.println("Ingresa un número: ");
numero = sc.nextInt();
System.out.println("Ingresa un múltiplo: ");
multiplo = sc.nextInt();
if (numero % multiplo == 0) {
System.out.printf("%d es múltiplo de %d", numero, multiplo);
} else {
System.out.println("No es múltiplo");
}
@Montsanttgn
Copy link

Gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment