sorry about the code tags.

and for the data.txt file that it reads these are the numbers in the file:

0123123232020

0234234345025

34563456565010

456745677105

5678678757525

i also attatched the txt file.

Code:

#include <stdio.h>
int main(void)
{
int PartNo[5];
float Price[5];
int QOH[5];
int ReorderPt[5];
int MinOrder[5];
int x[4];
int i;
int y;
FILE *Fp1;
Fp1 = fopen("data.txt", "r");
if ( Fp1 == NULL )
{
perror ( NULL );
}
for(y=0;y<5;y++)
{
for(i=0;i<4;i++)
fscanf(Fp1,"%d",&x[i]);
PartNo[y] = ((x[0]*1000)+(x[1]*100)+(x[2]*10)+x[3]);
}
for(y=0;y<5;y++)
{
for(i=0;i<4;i++)
fscanf(Fp1, "%d", &x[i]);
Price[y] = ((x[0]*1000)+(x[1]*100)+(x[2]*10)+x[3])/100;
}
for(y=0;y<5;y++)
{
for(i=0;i<4;i++)
fscanf(Fp1, "%d", &x[i]);
QOH[y] = ((x[0]*1000)+(x[1]*100)+(x[2]*10)+x[3]);
}
for(y=0;y<5;y++)
{
for(i=0;i<4;i++)
fscanf(Fp1, "%d", &x[i]);
ReorderPt[y] = ((x[0]*1000)+(x[1]*100)+(x[2]*10)+x[3]);
}
for(y=0;y<5;y++)
{
for(i=0;i<4;i++)
fscanf(Fp1, "%f", &x[i]);
MinOrder[y] = ((x[0]*1000)+(x[1]*100)+(x[2]*10)+x[3]);
}
for(y=0;y<5;y++)
{
if(QOH[y]<ReorderPt[y])
QOH[y] = QOH[y]+MinOrder[y];
}
printf("\n\b |-----------------------------------------------------------|");
printf("\n\b |Part Number --- Price --- Quantity on Hand --- Reorder Point --- Minimum Order |");
printf("\n\b |-----------------------------------------------------------|");
printf("\n | %4d --- %2.2f --- %2d --- %2d |", PartNo[0], Price[0], QOH[0], ReorderPt[0], MinOrder[0]);
printf("\n | %4d --- %2.2f --- %2d --- %2d |", PartNo[1], Price[1], QOH[1], ReorderPt[1], MinOrder[1]);
printf("\n | %4d --- %2.2f --- %2d --- %2d |", PartNo[2], Price[2], QOH[2], ReorderPt[2], MinOrder[2]);
printf("\n | %4d --- %2.2f --- %2d --- %2d |", PartNo[3], Price[3], QOH[3], ReorderPt[3], MinOrder[3]);
printf("\n | %4d --- %2.2f --- %2d --- %2d |", PartNo[4], Price[4], QOH[4], ReorderPt[4], MinOrder[4]);
printf("\n\b |-----------------------------------------------------------|");
return 0;
}

once again thanks for the help