วันอังคารที่ 30 มิถุนายน พ.ศ. 2552

#include<stdio.h>
#include<string.h>
int main(void) {
struct cartoon_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,"Naruto ");
strcpy(book.author,"Nakamura Usuke");
book.price=40.50;
book.year=2550;
book.print_time_at=10;
book.telephone=4816902;
strcpy(book.mail,"www.Cartooninverse.com");
strcpy(book.distributor,"Cartooninverse ");

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);
}

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

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