Compare commits
2 Commits
00e502875f
...
74352305e3
Author | SHA1 | Date | |
---|---|---|---|
74352305e3 | |||
dba9c61961 |
BIN
du1/program
Executable file
BIN
du1/program
Executable file
Binary file not shown.
@ -10,6 +10,7 @@ struct pizza {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
void deshifr (char *text) {
|
void deshifr (char *text) {
|
||||||
for (int i = 0; text[i] != '\0'; i++) {
|
for (int i = 0; text[i] != '\0'; i++) {
|
||||||
switch (text[i]) {
|
switch (text[i]) {
|
||||||
@ -46,6 +47,20 @@ void deshifr (char *text) {
|
|||||||
}
|
}
|
||||||
text[i] = tolower(text[i]);
|
text[i] = tolower(text[i]);
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
struct pizza {
|
||||||
|
float prize;
|
||||||
|
char name[LINESIZE];
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
struct pizza nulova;
|
||||||
|
struct pizza tuniakova;
|
||||||
|
return 0;
|
||||||
|
>>>>>>> fd498cb (refresh)
|
||||||
}
|
}
|
||||||
|
|
||||||
int search_string (const char* heap_orig, const char* needle_orig) {
|
int search_string (const char* heap_orig, const char* needle_orig) {
|
||||||
|
BIN
du2/program
Executable file
BIN
du2/program
Executable file
Binary file not shown.
41
du2/program.c
Normal file
41
du2/program.c
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#define LINE_SIZE 100
|
||||||
|
|
||||||
|
struct pizza {
|
||||||
|
char name [LINE_SIZE];
|
||||||
|
float prize;
|
||||||
|
};
|
||||||
|
|
||||||
|
int read_pizza (struct pizza* list) {
|
||||||
|
|
||||||
|
int n = 0;
|
||||||
|
char line[200];
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
if (fgets(line, sizeof(line), stdin)==NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
line[strcspn(line, "\n")] = '\0';
|
||||||
|
if (strlen(line) == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
strcpy(list[n].name, line);
|
||||||
|
if (fgets(line, sizeof(line), stdin)==NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (scanf(line, "%f", &list[n].prize) !=1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user