วันอังคารที่ 23 มิถุนายน พ.ศ. 2552

Record-23/06/09

#include<stdio.h>
#include<string.h>
void main()
{
struct weapons
{
char customer[30];
char address[30];
char group[20];
char model[30];
float generation;
int serial;
unsigned int personal_id;
float price;

}gun;

strcpy(gun.customer,"Pooh");
strcpy(gun.address,"bangkok");
strcpy(gun.group,"vip");
strcpy(gun.model,"short");
gun.generation=0.38;
gun.serial=5766;
gun.personal_id=5898;
gun.price= 38000.00;

printf("Customer:%s\n",gun.customer);
printf("Address:%s\n",gun.address);
printf("Group:%s\n",gun.group);
printf("Model:%s\n",gun.model);
printf("Generation:%f\n",gun.generation);
printf("Serial:%d\n",gun.serial);
printf("Personal_id:%d\n",gun.personal_id);
printf("Price:%f\n",gun.price);

}

ไม่มีความคิดเห็น:

แสดงความคิดเห็น