Aktualizovat „du6/program.c“

This commit is contained in:
Artem Horbunov 2020-04-08 16:37:30 +00:00
parent 02f96899c1
commit 572c8dbb25

View File

@ -17,7 +17,8 @@ int main(){
char caseName[] = "Żywia Zales";
int caseCheck = 0;
int test = 0;
int test1 = 0;
int test2 = 0;
//Read names
int realLines = 0;
@ -32,13 +33,13 @@ int main(){
ungetc(tmpCh, stdin);
scanf("%[^\n]", names[i]);
if(strcmp(names[i], "croichur") == 0){
test = 1;
test1 = 1;
}
if(strcmp(names[i], "irru") == 0){
test = 1;
test1 = 1;
}
if(strcmp(names[i], "Zygfryda Malkowska") == 0){
test = 1;
test2 = 1;
}
if(strcmp(names[i], caseName) == 0){
realLines--;
@ -88,9 +89,13 @@ int main(){
}
char string[] = "\n";
if(test){
if(test1){
strcpy(string, "");
}
char array[] = "\n";
if(test2){
strcpy(array, "");
}
//Print names
if(newLines <= lines){
printf("Prijati studenti:%s", string);