วันเสาร์ที่ 27 มิถุนายน พ.ศ. 2552

DTS 02 - 23/06/2009

#include<stdio.h>
#include<string.h>
int main(void) {
struct detail_book{
char name[50];
char author[50];
int price;
int year;
int print_time_at;
int telephone;
char mail[50];
char distributor[50];

}book;
strcpy(book.name,"Business ethics");
strcpy(book.author,"Chintana Bunbongkan");
book.price=100;
book.year=2552;
book.print_time_at=11;
book.telephone=8312;
strcpy(book.mail,"Chulapress@chula.ac.th");
strcpy(book.distributor,"zero Jurarongkron university book ");

printf("name:%s\n\n",book.name);
printf("author:%s\n\n",book.author);
printf("price:%d\n\n",book.price);
printf("year:%d\n\n",book.year);
printf("print time at:%d\n\n",book.print_time_at);
printf("telephone:%d\n\n",book.telephone);
printf("mail:%s\n\n",book.mail);
printf("distributor:%s\n\n",book.distributor);
}

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

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