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

DTS-02/23/06/2552

#include < stdio.h >
#include < string.h >
void main()
{
struct communication {
char name[50];
char brand[50];
char colour[20];
char network[20];
int price;
char function[20];
char function1[20];
char function2[20];

};
struct communication mobile;
strcpy(mobile.name,"Telephone");
strcpy(mobile.brand,"Nokia N70");
strcpy(mobile.colour,"Black");
strcpy(mobile.network,"1-2call");
mobile.price=5500;
strcpy(mobile.function,"Game");
strcpy(mobile.function1,"Camera");
strcpy(mobile.function2,"Bluetooth");
printf("********* communicationi********\n\n");
printf("Name:%s\n",mobile.name);
printf("Brand:%s\n",mobile.brand);
printf("Colour:%s\n",mobile.colour);
printf("Network:%s\n",mobile.network);
printf("Price:%d\n",mobile.price);
printf("Function:%s\nFunction:%s\nFunction:%s\n",mobile.function,mobile.function1,mobile.function2);
}

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

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