Compare commits

...

2 Commits

Author SHA1 Message Date
74352305e3 refresh 2025-10-01 10:31:12 +02:00
dba9c61961 refresh 2025-10-01 10:29:17 +02:00
4 changed files with 56 additions and 0 deletions

BIN
du1/program Executable file

Binary file not shown.

View File

@ -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

Binary file not shown.

41
du2/program.c Normal file
View 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;
}