Prob D
Prob D
Prob D
T
T
NO
BU
College Student
Bibi is a lecturer who manages a student database at a university. Before Bibi existed, the
student database was not well organized, and was not collected per student, so students’
data could be chopped up and scattered irregularly between one another.
I
Because Bibi is a lecturer who has studied “struct”, Bibi wants to store all the data given
R
O
in the struct. Making it easier to find and reuse.
You are encouraged to use the struct method to solve this problem to make it easier to
store data.
T
D
• NIM
DI
• Age (Umur)
Format Input
The input in the first row contains an integer N , how much student data you have to
save. For the next N ×10 rows of student data you must save sequentially from the Name
until Account Number
IS
Format Output
The output consists of (N × 10) + N lines. Student data is preceded by “Mahasiswa
ke-X:”, where X is the order of students.
ED
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.
E
COMP6047 – Algorithm and Programming
T
T
Constraints
NO
• 1 ≤ N ≤ 100
BU
• 1 ≤ |N ame| ≤ 100
• |N IM | = 9
• 1 ≤ Age ≤ 100
I
• |P ostalCode| = 6
R
O
• 1 ≤ |P laceOf Birth| ≤ 100
• 1 ≤ |HighSchool| ≤ 100
• |BankAccountN umber| = 9
2
Lili
123456789
13
786431
Jakarta
N
IB
14SEPT2010
Bina Nusantara School
7
123
968543769
TR
DO
Jojo
125676789
22
711111
Bekasi
1JANUARY2018
IS
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.
E
COMP6047 – Algorithm and Programming
T
T
Sample Output (standard output)
NO
BU
Mahasiswa ke-1:
Nama: Lili
NIM: 123456789
Umur: 13
Kode Pos: 786431
Tempat Lahir: Jakarta
I
Tanggal Lahir: 14SEPT2010
Almamater SMA: Bina Nusantara School
R
O
Jumlah Saudara Kandung: 7
Tinggi Badan: 123
NOMOR REKENING: 968543769
T
Mahasiswa ke-2:
D
Nama: Jojo
NIM: 125676789
Umur: 22
S
Kode Pos: 711111
Tempat Lahir: Bekasi
DI
Note
The AlmamaterSM A data may contain several spaces.
N
IB
TR
DO
IS
ED
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.
E
COMP6047 – Algorithm and Programming
T
T
NO
BU
College Student
Bibi adalah seorang dosen yang mengurus database mahasiswa pada sebuah universitas.
Sebelum ada Bibi, database mahasiswa tidak tersusun dengan baik, dan tidak dikumpulkan
per mahasiswa, sehingga data para mahasiswa dapat tercacah dan tersebar tidak teratur
antara satu dan yang lainnya.
R I
O
Karena Bibi adalah seorang dosen yang sudah mempelajari “struct”, maka Bibi ingin
menyimpan semua data yang diberikan dalam struct. Sehingga memudahkan untuk dicari
dan digunakan kembali.
T
D
• Nama
• NIM
• Umur
OT
UT
RE
• Kode Pos
• Tempat Lahir
• Tanggal Lahir
N
• Almamater SMA
IB
• Jumlah Saudara kandung
• Tinggi Badan
TR
DO
• Nomor Rekening
Format Input
Input pada baris pertama berisi sebuah integer N , banyaknya data mahasiswa yang harus
anda simpan. Untuk N × 10 baris berikutnya terdiri dari data mahasiswa yang harus
IS
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.
E
COMP6047 – Algorithm and Programming
T
T
Format Output
NO
BU
Output terdiri dari (N × 10) + N baris. Data mahasiswa didahului oleh “Mahasiswa
ke-X:”, dimana X merupakan nomor urutan mahasiswa.
Constraints
• 1 ≤ N ≤ 100
I
• 1 ≤ |N ama| ≤ 100
R
O
• |N IM | = 9
• 1 ≤ U mur ≤ 100
T
D
• |KodeP os| = 6
• 1 ≤ |T empatLahir| ≤ 100
S
• 1 ≤ |T anggalLahir| ≤ 100
DI
• 1 ≤ |AlmamaterSM A| ≤ 100
• 1 ≤ JumlahSaudaraKandung ≤ 100
• 1 ≤ T inggiBadan ≤ 1000
OT
UT
RE
• |N omorRekening| = 9
14SEPT2010
Bina Nusantara School
7
123
968543769
Jojo
IS
125676789
22
711111
Bekasi
1JANUARY2018
ED
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.
E
COMP6047 – Algorithm and Programming
T
T
Bina Nusantara School
99
NO
BU
12
890234789
I
Mahasiswa ke-1:
Nama: Lili
R
O
NIM: 123456789
Umur: 13
Kode Pos: 786431
T
Tempat Lahir: Jakarta
D
Mahasiswa ke-2:
Nama: Jojo
NIM: 125676789
Umur: 22
OT
Kode Pos: 711111
UT
RE
© School of Computer Science - BINUS, 2021. No part of the materials available may be copied,
photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form,
in whole or in part, without prior written consent of School of Computer Science - BINUS. Any other
reproduction in any form without the permission of School of Computer Science - BINUS is probihited.
Violators of this clause may be academically sanctioned.