Update cv1/program.c
This commit is contained in:
parent
e588fa5727
commit
aab3da0a10
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user