Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Home Work 10 @Nurnobi shanto
- #include<stdio.h>
- #include<string.h>
- typedef struct Product
- {
- char name[30];
- int code;
- float price;
- }p;
- int main()
- {
- p shampoo,Tshirt;
- printf("Enter shampoo product name:");
- scanf("%s",&shampoo.name);
- printf("Enter product code:");
- scanf("%d",&shampoo.code);
- printf("Enter shampoo price:");
- scanf("%f",&shampoo.price);
- printf("\nEnter T-Shirt product name:");
- scanf("%s",&Tshirt.name);
- printf("Enter product code:");
- scanf("%d",&shampoo.code);
- printf("Enter T-shirt price:");
- scanf("%f",&shampoo.price);
- printf("\nShampoo product name:%s\n",shampoo.name);
- printf("product code: %d\n",shampoo.code);
- printf("shampoo price: %f\n",shampoo.price);
- printf("\nT-Shirt product name:%s\n",Tshirt.name);
- printf("product code: %d\n",shampoo.code);
- printf("Enter T-shirt price: %f\n",shampoo.price);
- return 0;
- }
Add Comment
Please, Sign In to add comment