From aab3da0a103d114f790ecc46cb1d3a43fa6a0374 Mon Sep 17 00:00:00 2001 From: Yurii Yakovenko Date: Mon, 30 Sep 2024 20:20:35 +0000 Subject: [PATCH] Update cv1/program.c --- cv1/program.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index db68c0f..8e3fa97 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -7,8 +7,7 @@ bool check(char* s2, char *pz) char *s=(char*) malloc(strlen(s2)+1); char shifer[85]="oizeasbtbq"; - for(int i = 0; s2[i]!='\0'; i++) - + for(int i = 0; s2[i]!='\0'; i++) { //printf("%d ",i); s[i]=tolower(s2[i]); @@ -32,19 +31,19 @@ int main() char *p; float price; int count =0; + printf("Zadaj hladanu surovinu:\n"); scanf("%s", pizz); while(1) { + printf("Zadaj␣jedalny␣listok:\n"); do p=fgets(r, 299, stdin); while(p!=NULL && p[0]=='\n'); if(p==NULL) - break; - //else printf("\n============ %s",r); + break; if(scanf("%f", &price)!=1) - break; - //else printf("%f",price); + break; if(check(r, pizz)) { count++; @@ -55,4 +54,3 @@ int main() return 0; } -