[ create a new paste ] login | about

Link: http://codepad.org/7wLyYmje    [ raw code | output | fork ]

C, pasted on Sep 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>

int main(void){
	int iHp = 100;
	int iAtk = 50;
	int iDef = 30;
	int iDmg;

	printf("2ch戦士の現在のHP:%d\n", iHp);

	printf("Kazukingの攻撃(攻撃力%d)\n", iAtk);
	printf("2ch戦士(防御力%d)は", iDef);

	iDmg = iDef - iAtk;
	printf("%dのダメージを受けた\n", iDmg);

	iHp -= iDmg;
	printf("2ch戦士の現在のHP:%d\n", iHp);

	return (0);
}


Output:
1
2
3
4
2ch戦士の現在のHP:100
Kazukingの攻撃(攻撃力50)
2ch戦士(防御力30)は-20のダメージを受けた
2ch戦士の現在のHP:120


Create a new paste based on this one


Comments: