Repetir un numero de enteros

import java.lang.*; import java.io.*; import java.util.*; /** * class PuntoEnX here. * * @author (Amalio) * @version (PX_v1) */ public class NumEnt{ // instance variables private static int z; /* * Constructor for objects of class PuntoEnX */ public NumEnt(){ /*initialise instance variables en el origen de coordenadas*/ this.z = 0; } /* * Constructor for objects of class PuntoEnX */ public NumEnt(int z){ /*initialise instance variables*/ this.z = z; } /* * An example of a method - replace this comment with your own * * @param y a sample parameter for a method * @return the sum of x and y */ public static int repNumEnt(int y){ /* put your code here*/ int devuelve = 0; for(devuelve=0;devuelve <=y-1; devuelve=devuelve+1) devuelve = devuelve++; return devuelve+1; } public static void main(String[]arg){ Scanner tecl = new Scanner(System.in).useLocale(Locale.US); System.out.println("Introduzca el numero de enteros a repetir"); int z = tecl.nextInt(); for(int i= 0;i

Comentarios

Entradas populares de este blog

Lista Decremental Z números enteros