Commit f85f562e by emonyi

Upload New File

parent bc9e045d
Showing with 30 additions and 0 deletions
#include <stdio.h>
#include <string.h>
int main(){
int i, j, a;
char name[10][40]; // name string
printf("please enter ten names:\n");
for(i=0; i<10; i++){
scanf("%s", name[i]);
}
for (i=0; i < 11; i++){
for(j=i+1; j < 11; j++){
a= strcmp(name[i],name[j]);
if (a==0){
printf("Duplicate detected");
return 0;
}
}
}
printf("No duplicate");
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