You are on page 1of 2

/*

* 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 javaapplication7;

/**
*
* @author usuario1
*/
import java.util.Scanner;
public class JavaApplication7 {

/**
* @param args the command line arguments
*/

public static void main(String[] args) {


// TODO code application logic here
Scanner sc = new Scanner (System.in);
int n = sc.nextInt();
int cedula [] = new int [100];
System.out.println("cuantas personas desea ingresar en el sistema");
String nombre [][] = new String [100][100];
String cargo [][] = new String [100][100];
int sueldo [][] = new int [100][100];
String correo[][] = new String [100][100];
int j;
int c=0;
int i;
int cont = 0;
System.out.println("-----DATOS PERSONALES-----");
System.out.println("\n");
for (i=0; i<n ;i++){
System.out.println("Ingrese la Cedula");
cedula[i]= sc.nextInt();
for (j=0;j<1;j++){
System.out.println("Ingrese el Nombre");
nombre[i][j]= sc.next();
System.out.println("Ingrese el Cargo");
cargo[i][j]= sc.next();
System.out.println("Ingrese el Sueldo");
sueldo[i][j]= sc.nextInt();
System.out.println("Ingrese el correo electronico");
correo[i][j]= sc.next();
System.out.println("\n");

}
}
System.out.println("Ingrese la cedula para buscar entre los registros");
c= sc.nextInt();
for (i=0;i<n;i++){
for (j=0;j<1;j++){
if(c== cedula[i]){
System.out.println("\n");
System.out.println("Nombre");
System.out.println(""+nombre[i][j]);
System.out.println("Cargo");
System.out.println(""+cargo[i][j]);
System.out.println("Sueldo");
System.out.println(""+sueldo[i][j]);
System.out.println("Correo electronico");
System.out.println(""+correo[i][j]);
break;
}
}
}

You might also like