Ciclos - int n; String user = "";...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import*;  import java.util.*;  public class MasCiclos{    public static Scanner teclado = new Scanner(;    public static void multiplicar(int n){  int res = 0  for(int i=0; i<=n; i++){  res = n*i;  System.out.println(n+"x"+i+"="res)}    public static void main(String args[]){ 
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int n; String user = &quot;&quot;; do{ System.out.print(&quot;Ingrese el valor de n (positivo): &quot;); n = teclado.nextInt(); multiplicar(n); System.out.println(&quot;\n\nDesea continuar?&quot;); user =; }while(user.toLowerCase().equals(&quot;si&quot;)); } }...
View Full Document

Ask a homework question - tutors are online