Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Could you change this codes integers?

0 votes
asked Dec 24, 2018 by anonymous

#include <stdio.h>
#include <conio.h>

void main()
{
struct date
{
int day;
int month;
int year;
};

struct details
{
char name[20];
int price;
int code;
int qty;
struct date mfg;
};

struct details item[50];
int n,i;

clrscr();

printf("Enter number of items:");
scanf("%d",&n);
fflush(stdin);

for(i=0;i<n;i++)
{
fflush(stdin);
printf("Item name:");
scanf("%[^\n]",item[i].name);

fflush(stdin);
printf("Item code:");
scanf("%d",&item[i].code);
fflush(stdin);

printf("Quantity:");
scanf("%d",&item[i].qty);
fflush(stdin);

printf("price:");
scanf("%d",&item[i].price);
fflush(stdin);

printf("Manufacturing date(dd-mm-yyyy):");
scanf("%d-%d-%d",&item[i].mfg.day,&item[i].mfg.month,&item[i].mfg.year);
}
printf(" ***** INVENTORY *****\n");
printf("------------------------------------------------------------------\n");
printf("S.N.| NAME | CODE | QUANTITY | PRICE |MFG.DATE\n");
printf("------------------------------------------------------------------\n");
for(i=0;i<n;i++)
printf("%d %-15s %-d %-5d %-5d %d/%d/%d\n",i+1,item[i].name,item[i].code,item[i].qty,item[i].price,
item[i].mfg.day,item[i].mfg.month,item[i].mfg.year);
printf("------------------------------------------------------------------\n");
getch();
}

I want to modify this codes integers to them:

A-Item B-Store Name C-Title of Good D-Description of good E-Rating 

3 Answers

0 votes
answered Dec 26, 2018 by anonymous
Could anyone help i need this so quick
0 votes
answered Dec 27, 2018 by Jasjit Singh Rayat
Can you be more specific ?

what do you want
0 votes
answered Dec 28, 2018 by 123
int a=0;hfydryreyryry
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...