Commit ae42fb6b by matjul

Upload New File

parent 1056f1f2
Showing with 31 additions and 0 deletions
#include <string.h>
#include <stdio.h>
int main (){
char list[10][20];
int i, j;
char x;
printf("Insert 10 names:\n");
for(i = 0; i < 10; i++){
scanf("%s", list[i]);
}
for(i = 0; i < 10; i++){
for(j = 0; j < 20; j++){
x = list[i][j];
if(x < 91 && x > 64){
x = x + 32;
list[i][j] = x;
}
}
}
for(i = 0; i < 10; i++){
for(j = 0; j < i; j++){
if(strcmp(list[i], list[j]) == 0){
printf("Name %s equals to name %s", list[i], list[j]);
}
}
}
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment