/*
* 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 tiposdedatos;
import java.util.Scanner;
/**
*
* @author Delgado Gustavo
*/
public class TiposDeDatos {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println("Delgado Diaz de Leon Gustavo");
System.out.println("valor en variable tipo entero");
int x=sc.nextInt();
System.out.println("ciclo FOR");
for(int j=1;j<=5;j++) {
System.out.println(x);
}
System.out.println("valor en variable tipo short");
short y=sc.nextShort();
System.out.println("ciclo FOR");
for(int j=1;j<=7;j++)
{
System.out.println(y);
}
System.out.println("valor en variable tipo long");
long s=sc.nextLong();
System.out.println("ciclo FOR");
for(int j=1;j<=10;j++){
System.out.println(s);
}
System.out.println("valor en variable tipo byte");
byte r=sc.nextByte();
System.out.println("ciclo FOR");
for(int j=1;j<=5;j++){
System.out.println(r);
}
System.out.println("valor en variable tipo cadena");
String o=sc.next();
System.out.println("ciclo FOR");
for(int j=1;j<=5;j++){
System.out.println(o);
}
System.out.println("valor en variable tipo doble");
double m=sc.nextDouble();
System.out.println("ciclo FOR");
for(int j=1;j<=5;j++){
System.out.println(m);
}
System.out.println("valor en variable tipo boolean");
boolean p=sc.nextBoolean();
System.out.println("ciclo FOR");
for(int j=1;j<=5;j++){
System.out.println(p);
}
// TODO code application logic here
}
}
No hay comentarios.:
Publicar un comentario