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

DTS 02-23/06/2552

#include <stdio.h>
#include <string.h>
void main()
{
struct car {
char customer_name[30];
char tel_number[30];
char brand[30];
char series[10];
char price[30];
int total;
char date[30];
char personnel_name[30];
};

struct car sale;
strcpy(sale.customer_name,"Bunchu bunmee");
strcpy(sale.tel_number,"0847657987");
strcpy(sale.brand,"BMW");
strcpy(sale.series,"5");
strcpy(sale.price,"2300000");
sale.total=1;
strcpy(sale.date,"29/06/52");
strcpy(sale.personnel_name,"Tanawan kongsaeng");


printf("******car sale******\n\n");
printf("Customer name :%s\n\n",sale.customer_name);
printf("Telephone number :%s\n\n",sale.tel_number);
printf("Brand :%s\n\n",sale.brand);
printf("Series :%s\n\n",sale.series);
printf("Price :%s baht\n\n",sale.price);
printf("Total :%d\n\n",sale.total);
printf("Date :%s\n\n",sale.date);
printf("Personnel name :%s\n\n",sale.personnel_name);

}

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

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