I have tried to make a program that allows inputs into a 1D array. I run the program and the inputs are asked for, but the program simply continues to ask for more inputs.
I'm moderately new to C so go easy.
Any help would be appreciated
Cheers
Wonkerloop
Heres the code:
#include <stdio.h>
main()
{
float price[10];
float vatprice[10];
int count;
printf("Please enter a values to be stored in the table\n");
for (count=0;count<10;count++)
{
printf("Value: ");
scanf("%f",&price[10]);
}
//while (count!=10);
printf("\n%d",price[10]);
/*
do
{
printf("\nWorking...");
vatprice[10] = price[10] * 1.175;
countvat==countvat+1;
}
while (countvat!=10);
printf("\nThis is our pretty table with original and Vat prices \n\n %d",vatprice[10]);
*/
return(0);
}