refresh
This commit is contained in:
parent
3423a97860
commit
9dda185940
@ -1,25 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#define LINESIZE 100
|
||||
|
||||
|
||||
int najty (char* pole, int size, char znak) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (pole[i] < size) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
dssdsfsd
|
||||
int main() {
|
||||
char text[] = "Zdarova Oleksandr!";
|
||||
char hochunajti = 's';
|
||||
int pozition = najty(text, sizeof(text), hochunajti);
|
||||
|
||||
if (pozition != -1) {
|
||||
printf("Znak '%c' na %d", hochunajti, pozition);
|
||||
} else {
|
||||
printf("nebyla najdena poshol nahui");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
struct pizza {
|
||||
float prize;
|
||||
char name[LINESIZE];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user