”z—ñ‚Æ\‘¢‘Ì( No.0 )
  • “úŽžF 2024/05/14 18:17
  • –¼‘OF ‘å–‚‰¤@iID: kpDooGZ2j

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>

// \‘¢‘Ì
typedef struct {
char name[64];
int hp;
int mp;
int pow;
int def;
} status;

int main(void) {

status nakama[3] = {
{"KEN", 250, 140, 100, 60},
{"KEN", 250, 140, 100, 60},
{"KEN", 250, 140, 100, 60},
};

for (int i = 0; i < 3; i++) {
printf("NAME:%s HP:%d MP:%d ATK:%d DEF:%d\n", nakama[i].name, nakama[i].hp, nakama[i].mp, nakama[i].pow, nakama[i].def);
}
return 0;
}