#include "stdio.h"
struct tv
{
char band[10] ;
float price ;
int channel ;
char program [10];
int day ;
char time[10] ;
char about [10];
char watching [10] ;
int hour ;
}
brand;
void input_data()
{
printf("Product TV");
printf ("What tvbrand do you like\n");
scanf ("%s",&brand.band) ;
printf("How much is the product\n");
scanf("%f",&brand.price);
printf ("What channel do you like\n");
scanf ("%d",&brand.channel) ;
printf ("What's program do you like\n");
scanf ("%s",&brand.program) ;
printf ("How watchig this Progarm In 1 week \n");
scanf ("%d",&brand.day) ;
printf ("Time of this program\n");
scanf ("%s",&brand.time) ;
printf ("What's this program about\n");
scanf ("%s",&brand.about) ;
printf ("Do'you watching this program with\n") ;
scanf ("%s",&brand.watching) ;
printf ("How hour this program\n");
scanf ("%d",&brand.hour) ;
}
void show_data()
{
printf ("#####################DaTa Product Tv########################\n") ;
printf ("Band:%s\n",brand.band);
printf ("Channel:%d\n",brand.channel);
printf ("price:%.2f\n",brand.price);
printf ("Program:%s\n",brand.program);
printf ("Day:%d\n",brand.day);
printf ("Time:%s\n",brand.time);
printf ("About:%s\n",brand.about);
printf ("With anyone:%s\n",brand.watching);
printf ("hour:%d\n",brand.hour);
}main (){input_data();
show_data();
return (0);
}
30 มิถุนายน 2552
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)

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