วันพุธที่ 1 กรกฎาคม พ.ศ. 2552

DTS02-23-06-2552

#include
#include
int main(void)
{
struct fan{
char series[20];
char brand[10];
float price;
char color[10];
float weight;
float tall;
float power;
char type[20];
}
product;
strcpy(product.series,"SonyE700");
strcpy(product.brand,"SONY");
product.price=750;
strcpy(product.color,"Green");
product.weight=2.5;
product.tall= 125;
product.power=100;
strcpy(product.type,"floor");

printf("Series : %s\n Brand : %s\n Price : %f\n Color : %s\n Weight : %f\n Tall : %f\n Power :%f\n Type : %s\n",
product.series,product.brand,product.price,product.color,product.weight,product.tall,product.power,product.type);
return 0;
}

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

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