Hi,
I need your help, I need to simulate a Cash register that enables the user to enter name of the item(s)-, then entering the number of items and price per unit (all for each item bought-maximum 20 items). This then is outputted in a table(Receipt) with items, items bought, price/unit, and line total with the subtotal and 17.5% VAT calculated to give Total payable:, finally with cash entered and change. Sorry to go on and on but I really need your help - my code so far is below can you help me with the errors?
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
#define MAX 20
int main(void)
{
int loop,Number[20],Price[20]
char Item[20];
float Line[20];
clrscr();
for(loop=1;loop<=20;loop++)
{
printf("Please enter the name of Item %s\n",loop);
scanf("%d",&Number[loop-1]);
}
{
printf("Please input the Number of Item%s:%d\n",loop);
scanf("%d",&Number[loop-1]);
}
{
printf("Please input the Price per unit for Item%s:%d\n",loop);
scanf("%d",Price[loop-1]);
}
for(loop=1;loop<=20;loop++)
{
Line = Number*Price[loop-1];
}
subtotal = Line+%d
The end and also the middle of the code needs to be modified can you please help?
Thanx.