76 978
Assignments Done
98,5%
Successfully Done
In June 2019

Answer to Question #22652 in C++ for NICE dreamer

Question #22652
Q.......A parts inventory record contains the following fields:
• record code, (only code 11 is valid)
• part number (6 characters; 2 alpha and 4 numeric, e.g. AA1234),
• part description, and
• inventory balance
Design an algorithm that will read the file of parts inventory records, validate the record code and part number of each record, and print the details of all valid inventory records which have an inventory balance equal to zero.
C-CODE:
printf("enter record code:\n,part number:\n,invent_bal:\n");
scanf("%d%d%d",&recrd_cde,&prt_no,&invent_bal);
do
{
if(recrd_cde==11)
{
if(prt_no==ch[6])
{if(invent_bal==0);
{
printf("%d%d%d%d are deatails\n",recrd_cde,prt_no,prt_desc,invent_bal);
}
}
}
else
{
if(recrd_cde!=11)
{
if(prt_no!=ch[6])
{
if(invent_bal!=0)
{
printf("inventory record is not valid\n");
}
}
}
printf("want to enter more records?:y/n\n "); }
while(cnt=='y');
system("pause"); } ....//SYNTAX ERROR AT END OF INPUT
Expert's answer

Not answered

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions