Postingan lainnya
Penggunaan koding pada mekanisme combat bergiliran sederhana menggunakan C
Example Output :
turn 1
boy attacked goblin1 for 10 damage; goblin1 hp: 155
goblin 1 attacked boy for 3 damage; boy hp: 197
goblin 2 attacked boy for 4 damage; boy hp: 193
goblin 3 attacked boy for 1 damage; boy hp: 192
turn 2
boy attacked goblin1 for 10 damage; goblin1 hp: 145
goblin 1 attacked boy for 3 damage; boy hp: 189
goblin 2 attacked boy for 4 damage; boy hp: 185
goblin 3 attacked boy for 1 damage; boy hp: 184
At the end of the battle, print the total turns that been happened and the remaining cumulative HP of the winning party.
Bagaiman contoh program yang harus di gunakan untuk membuat output seperti ini ?
0
Belum ada Jawaban. Jadi yang pertama Jawaban
Login untuk ikut Jawaban