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

Record 23/6/52

#include <stdio.h>
#include <string.h>
void main()
{
struct notebook
{
char notebook_shop[20];
char customer[20];
float notebook_apple_max_book_air;
float notebook_hp_s513;
float notebook_toshiba_t242;
float notebook_acer_s112;
int insurance_notebook;
float total;
};
struct notebook my;
strcpy(my.notebook_shop,"OK_Computer");
strcpy(my.customer,"supphachai");
my.notebook_apple_max_book_air=50000;
my.notebook_hp_s513=35900;
my.notebook_toshiba_t242=39900;
my.notebook_acer_s112=30000;
my.insurance_notebook=1;
my.total=155800;

printf(" ----------OK_Computer----------\n\n");
printf(" notebook_shop : %s\n\n",my.notebook_shop);
printf(" customer : %s\n\n",my.customer);
printf(" notebook_apple_max_book_air : %.2f\n\n",my.notebook_apple_max_book_air);
printf(" notebook_hp_s513 : %.2f\n\n",my.notebook_hp_s513);
printf(" notebook_toshiba_t242 : %.2f\n\n",my.notebook_toshiba_t242);
printf(" notebook_acer_s112 : %.2f\n\n",my.notebook_acer_s112);
printf(" notebook_benq_q599 : %d\n\n",my.insurance_notebook);
printf(" total : %.2f\n\n",my.total);
}

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

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