tipos de datos
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tipos.de.datos;
import java.util.Scanner;
/**
*
* @author conalep
*/
public class TiposDeDatos {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);//Creando objeto sc de la clase Scanner
System.out.println("Captura de numero ");//Imprime mensaje
int j=sc.nextInt();//Captura de una variable entera
System.out.println("Variabe entera: "+j);//Imprime mensaje y variabe
System.out.println("Ciclo FOR ");
for(int i=1;i<=j;i++){
System.out.println("Hola mundo");
}
// TODO code application logic here
}
}
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package tipos.de.datos;
import java.util.Scanner;
/**
*
* @author conalep
*/
public class TiposDeDatos {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);//Creando objeto sc de la clase Scanner
System.out.println("Captura de numero ");//Imprime mensaje
int j=sc.nextInt();//Captura de una variable entera
System.out.println("Variabe entera: "+j);//Imprime mensaje y variabe
System.out.println("Ciclo FOR ");
for(int i=1;i<=j;i++){
System.out.println("Hola mundo");
}
// TODO code application logic here
}
}
Comentarios
Publicar un comentario