//class Circle
//{
// int radius;
// public Circle(int radius)
// {
// this.radius = radius;
// }
// public double getArea()
// {
// return 3.14159265358979*radius*radius;
// }
//}
//public class Main
//{
// public static void main(String[] args)
// {
// Circle[] c;
// c = new Circle[5];
//
// for(int i=0; i<c.length; i++)
// {
// c[i] = new Circle(i);
// }
//
// for(int i=0; i<c.length; i++)
// {
// System.out.print((int)(c[i].getArea()) + " ");
// }
// }
//}
//import java.util.*;
//
//
//class Circle
//{
// private double x,y;
// private int radius;
// public Circle (double x, double y, int radius)
// {
// this.x = x;
// this.y = y;
// this.radius = radius;
// }
// void show()
// {
// System.out.printf("(%.1f,%.1f)%d\n", x,y,radius);
// }
//}
//public class Main
//{
// public static void main(String[] args)
// {
// Scanner t = new Scanner(System.in);
// Circle[] c = new Circle[3];
// for(int i=0; i<c.length; i++)
// {
// System.out.print("x, y, radius >>");
// double x = t.nextDouble();
// double y = t.nextDouble();
// int radius = t.nextInt();
// c[i] = new Circle(x,y,radius);
// }
// for(int i=0; i<c.length; i++) c[i].show();
// }
//}
//import java.util.*;
//class day
//{
// private String work;
// public void set(String work) {this.work = work;}
// public String get() {return work;}
// public void show()
// {
// if(work == null)System.out.println("? 없는디?");
// else System.out.println(work + "네 빨리 해.");
// }
//}
//
//public class Main
//{
// public static void main(String[] args)
// {
// day[] d = new day[30];
// String work = null;
// for(int i=0; i<30; i++)
// {
// d[i] = new day();
// }
// Scanner t = new Scanner(System.in);
// System.out.println("이번달 스케쥴 관리 프로그램.");
// while(true)
// {
// System.out.print("할일(입력 : 1, 보기 : 2, 끝 : 3) >>");
// int n = t.nextInt();
// if(n==1)
// {
// System.out.print("날짜는?(1~30) >>");
// int m = t.nextInt();
// System.out.print("ㅇㅋ그럼 할일은?(빈칸없이) >>");
// work = t.next();
// d[m].set(work);
// }
// if(n==2)
// {
// System.out.print("날짜는?(1~30) >>");
// int m = t.nextInt();
// d[m].show();
// }
// if(n==3)
// {
// System.out.println("ㅇㅋ꺼져드림");
// return;
// }
// }
// }
//}
import java.util.*;
class Pb
{
String name, tel;
public Pb(String name, String tel)
{
this.name = name;
this.tel = tel;
}
void show()
{
System.out.println(name+"의 전번이...."+tel+"이네");
}
}
public class Main
{
public static void main(String[] args)
{
Scanner t = new Scanner(System.in);
System.out.print("저장할 사람의 인원수는 ?");
int peo = t.nextInt();
Pb[] pb = new Pb[peo];
for(int i=0; i<peo; i++)
{
System.out.print("이름과 전번(둘다 빈칸 없이) >> ");
String name = t.next();
String tel =t.next();
pb[i] = new Pb(name, tel);
}
System.out.println("저장중이야.......");
while(true)
{
System.out.print("검색할 사람의 이름은? >> ");
String name = t.next();
if(name.equals("그만"))
{
return;
}
for(int i=0;i<pb.length;i++)
{
if(pb[i].name.equals(name))
{
pb[i].show();
break;
}
if(i == pb.length-1)
{
System.out.println("어..... "+name+"이 없는데?");
}
}
}
}
}