tesco.c
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
const int P = 13;
const int hotovost[] = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5, 2,
1 };
int main(){
float cn;
char c[200];
float hodene[100];
int pocet = 0, difer = 0;
const char s[2] = " ";
char *p;
printf("Enter value of your bill: ");
scanf("%f",&cn); // vstup cena
if((0.<cn) & (cn<10000.)){ // podmienka cena
// vstup 2
printf("Insert money for payment: ");
int i = 0,y=0, penezi = 0;
while((fgets(c,sizeof c,stdin))) {
for(;i < strlen(c) ;i++){
if(c[i] == '') break;
}
if((c[i] == '') && (y==1)){
p = (strtok(c, s));
while((p != NULL)){
hodene[pocet] = atof(p);
p = strtok(NULL, s);
//printf("# %.2f", minc[pocet]);
if(hodene[pocet] == 0.) break;