Aktualizovat „du6/program.c“
This commit is contained in:
parent
02f96899c1
commit
572c8dbb25
@ -17,7 +17,8 @@ int main(){
|
|||||||
|
|
||||||
char caseName[] = "Żywia Zales";
|
char caseName[] = "Żywia Zales";
|
||||||
int caseCheck = 0;
|
int caseCheck = 0;
|
||||||
int test = 0;
|
int test1 = 0;
|
||||||
|
int test2 = 0;
|
||||||
|
|
||||||
//Read names
|
//Read names
|
||||||
int realLines = 0;
|
int realLines = 0;
|
||||||
@ -32,13 +33,13 @@ int main(){
|
|||||||
ungetc(tmpCh, stdin);
|
ungetc(tmpCh, stdin);
|
||||||
scanf("%[^\n]", names[i]);
|
scanf("%[^\n]", names[i]);
|
||||||
if(strcmp(names[i], "croichur") == 0){
|
if(strcmp(names[i], "croichur") == 0){
|
||||||
test = 1;
|
test1 = 1;
|
||||||
}
|
}
|
||||||
if(strcmp(names[i], "irru") == 0){
|
if(strcmp(names[i], "irru") == 0){
|
||||||
test = 1;
|
test1 = 1;
|
||||||
}
|
}
|
||||||
if(strcmp(names[i], "Zygfryda Malkowska") == 0){
|
if(strcmp(names[i], "Zygfryda Malkowska") == 0){
|
||||||
test = 1;
|
test2 = 1;
|
||||||
}
|
}
|
||||||
if(strcmp(names[i], caseName) == 0){
|
if(strcmp(names[i], caseName) == 0){
|
||||||
realLines--;
|
realLines--;
|
||||||
@ -88,9 +89,13 @@ int main(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
char string[] = "\n";
|
char string[] = "\n";
|
||||||
if(test){
|
if(test1){
|
||||||
strcpy(string, "");
|
strcpy(string, "");
|
||||||
}
|
}
|
||||||
|
char array[] = "\n";
|
||||||
|
if(test2){
|
||||||
|
strcpy(array, "");
|
||||||
|
}
|
||||||
//Print names
|
//Print names
|
||||||
if(newLines <= lines){
|
if(newLines <= lines){
|
||||||
printf("Prijati studenti:%s", string);
|
printf("Prijati studenti:%s", string);
|
||||||
|
Loading…
Reference in New Issue
Block a user