วันจันทร์ที่ 29 มิถุนายน พ.ศ. 2552

DTS-02/23/06/2552

#include
#include
void main()
{

struct car {
char kind[50];
char brand[50];
char genevation[50];
char color[30];
char price[30];
char gears[20];
int regis;
char country[20];
};

struct car vehicle;
strcpy(vehicle.kind,"car");
strcpy(vehicle.brand,"Honda");
strcpy(vehicle.genevation,"Jazz");
strcpy(vehicle.color,"white");
strcpy(vehicle.price,"560000");
strcpy(vehicle.gears,"Auto");
vehicle.regis=1234.00;
strcpy(vehicle.country,"Thailand");
printf("==========Car========\n\n");
printf(" Kind: %s\n",vehicle.kind);
printf(" Brand: %s\n",vehicle.brand);
printf(" Genevation: %s\n",vehicle.genevation);
printf(" Color: %s\n",vehicle.color);
printf(" Price: %s\n",vehicle.price);
printf(" Gears: %s\n",vehicle.gears);
printf(" Register: %d\n",vehicle.regis);
printf(" Country: %s\n",vehicle.country);

}

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

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