I'm going to agree with oler1s here. I got confused trying to follow the half completion of the first part where the second quarter (something you supposedly haven't gotten to yet?) is wrong. Anyway, I'm going to need a specific question to get everything straight in my head ;)
Hi, i hope u can help me wif tis qs.
Actually tis is d actual question...
-------------------------------------------------------------------------------------------------------------------
Write a prog. in C to input information of eight computer suppliers who r participating in a tender to supply computer 2 skools. The information of the supplier includes tender IDNo, supplier No., Name, address and quotation price, the information read is 2 b written to an output file. The prog. then reads the output file and find the lowest quotation price and print all the information of that supplier.
Use the following structure Supplier in the program.
struct Supplier
{
int tenderID;
int supplierNo;
char name[20];
char address[40];
float quotationPrice;
};
-------------------------------------------------------------------------------------------------------------------
Actually other solutions can b accepted too and it is not necessary 2 follow d suggested solution above.
Anyway tis is wot i haf done so far
#include<stdio.h>
struct Supplier_record adcs[8];
{int TenderID;
int supplierNo;
char name[20];
char address[40];
float quotationPrice;
};
struct supplier;
void main()
{
int count, quotationPrice;
float quotationPrice;
FILE *fopen(),*fptr;
if((fptr=fopen("quotationPrice.dat","w"))==NULL)
{
printf("Error in opening file\n");
exit(1);
}
strcpy("quotationPrice to/from file");
for(count=0;quotationPrice[count]!='0';count++);
putc(quotationPrice[count],fptr);
fclose(fptr);
if((fptr=open("quotationPrice.dat","r"))==NULL)
{
printf("File cannot be opened\n");
exit(1);
}
while((quotationPrice=getc(fptr!=EOF)
putfloat(price);
putfloat('\n')
fclose(fptr);
}
I rili hope that u can help me...!!
Ur help is kindly appreciated. Thank You.