skuska inputu
This commit is contained in:
parent
643165b818
commit
40cf04856b
@ -7,36 +7,45 @@ struct Pizza {
|
|||||||
char name[LINESIZE];
|
char name[LINESIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
int nacitaj(struct Pizza* polozka){
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int matches(heap, needle){
|
//int matches(heap, needle){
|
||||||
return 0;
|
// return 0;
|
||||||
|
|
||||||
}
|
//}
|
||||||
char r[LINESIZE];
|
|
||||||
char hacker_script(char c){
|
//char hacker_script(char c){
|
||||||
if (c == '5'){
|
// if (c == '5'){
|
||||||
r == 'S';
|
// r == 'S';
|
||||||
}
|
// }
|
||||||
return r;
|
// return r;
|
||||||
}
|
//}
|
||||||
|
|
||||||
int main (){
|
int main (){
|
||||||
char search_string[LINESIZE] = "Ostiepkova";
|
size_t velkost = 0;
|
||||||
|
char line[LINESIZE];
|
||||||
|
memset(line, 0, LINESIZE);
|
||||||
|
//char search_string[LINESIZE] = "Ostiepkova";
|
||||||
while(1){
|
while(1){
|
||||||
char *r = fgets(line, LINESIZE, stdin);
|
char *r = fgets(line, LINESIZE, stdin);
|
||||||
if (r == NULL){
|
velkost = strlen(line);
|
||||||
|
if (r == NULL || velkost == 1){
|
||||||
|
printf("%s", line);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
struct Pizza pizza;
|
|
||||||
memset(line, 0, sizeof(struct Pizza));
|
|
||||||
strcpy(pizz->name, line);
|
|
||||||
if (matches(search_string, line)){
|
|
||||||
printf("%s", pizza->name)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
struct Pizza pizza;
|
||||||
|
memset(line, 0,sizeof(struct Pizza));
|
||||||
|
strcpy(pizza.name, line);
|
||||||
|
//if (matches(search_string. line)){
|
||||||
|
// printf("%s", pizza->name);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
// strcpy(pizz->name, line);
|
||||||
|
// if (matches(search_string, line)){
|
||||||
|
// printf("%s", pizza->name)
|
||||||
|
// }
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user