#include<stdio.h>
#include<stdlib.h>
int main()
{
const int NUM = 5;
double prices[] = {9.92, 6.32, 12.63, 5.95, 10.29};
double units[5];
double amounts[5];
double total = 0;
int i;
for (i=0;i<NUM;i++){
printf("Enter number of units");
scanf("%d",&units[i]);
amounts[i] = prices[i] * units[i];
total = total + amounts[i];
}
printf("Price Units Amount\n");
for(i = 0; i < NUM; i++){
printf("%d %15d %15d\n",prices[i],units[i],amounts[i]);
}
printf("Total:%d",total);
system("PAUSE");
return 0;
}