usaa21/cv1/program.c

54 lines
849 B
C
Raw Normal View History

2021-09-28 14:26:25 +00:00
#include <stdio.h>
2021-10-04 15:54:42 +00:00
#include <string.h>
#define LINESIZE 100
struct Pizza {
float prize;
char name[LINESIZE];
};
2021-10-06 16:43:24 +00:00
//int matches(heap, needle){
// return 0;
2021-10-04 15:54:42 +00:00
2021-10-06 16:43:24 +00:00
//}
//char hacker_script(char c){
// if (c == '5'){
// r == 'S';
// }
// return r;
//}
2021-09-28 14:26:25 +00:00
int main (){
2021-10-06 16:43:24 +00:00
size_t velkost = 0;
char line[LINESIZE];
memset(line, 0, LINESIZE);
//char search_string[LINESIZE] = "Ostiepkova";
2021-10-04 15:54:42 +00:00
while(1){
char *r = fgets(line, LINESIZE, stdin);
2021-10-06 16:43:24 +00:00
velkost = strlen(line);
if (r == NULL || velkost == 1){
printf("%s", line);
2021-10-04 15:54:42 +00:00
break;
}
2021-10-06 16:43:24 +00:00
2021-10-04 15:54:42 +00:00
struct Pizza pizza;
2021-10-06 16:43:24 +00:00
memset(line, 0,sizeof(struct Pizza));
strcpy(pizza.name, line);
//if (matches(search_string. line)){
// printf("%s", pizza->name);
//}
2021-10-04 15:54:42 +00:00
2021-10-06 16:43:24 +00:00
// strcpy(pizz->name, line);
// if (matches(search_string, line)){
// printf("%s", pizza->name)
// }
//
2021-10-04 15:54:42 +00:00
}
return 0;
2021-09-28 14:26:25 +00:00
}