theCEED.com - Research your Interests!!
  • MEMBERSHIP PROFILE
  • bar
  • No member information.
  • login_button
  • sign_up_button
no_image

Fun Coding Contest

About the ceed

재밌는 코딩 대회 페이지입니다 :)

대회 일정 및 소개[클릭하세요]
Recommend : 9 I Total List : 58 I 2017-01-09
favorite
26번 주제 (Collection FrameWork) 2017.01.24 21:30:10
Nickname : 1. alphablade Recommend : 0 View : 285 btn_recommend.png declaration

Please enter reasons of report.

declaration

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import java.util. *;
 
public class HashMapEx {
    public static void main(String[] args) {
        HashMap <String, Integer > Student  = new HashMap <String, Integer >();
        Scanner t  = new Scanner(System.in);
        System.out.print("학생수 입력 : ");
        int n  = t.nextInt(),ix;
        String strName;
        
        for(int i =0;i <n;i + +){
            System.out.print("학생 정보를 입력해 주세요 : ");
            strName  = t.next();
            ix  = t.nextInt();
            
            Student.put(strName, ix);
        }
        System.out.print("학생 이름을 입력해 주세요 : ");
        String s  = t.next();
        System.out.println("학생 점수 : ");
        System.out.println(Student.get(s));
    }
}
 
cs

학생 점수 관리 프로그램

list
Comments

name

write a comment
TOTAL  0 Comments
* No comments. Please write comments