If we give two names then this displays the connection
between the two people. It is nothing but flames game
Answer Posted / gita
main()
{
char name1[20],name2[20];
int a,b,i,j,c;
clrscr();
printf("Enter the first name:\t");
gets(name1);
printf("Enter the second name:\t");
gets(name2);
a=strlen(name1);
b=strlen(name2);
for(i=0;i<=a;i++)
{
for(j=0;j<=b;j++)
{
if(name1[i]==name2[j])
{
a--;
b--;
}
}
}
c=a+b;
i=c%6;
switch(i)
{
case 0:printf("Friends");
break;
case 1:printf("lovers");
break;
case 2:printf("Ansisters");
break;
case 3:printf("marriage");
break;
case 4:printf("enemies");
break;
case5:printf("sisters");
break;
}
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is s or c?
define string ?
What is include directive in c?
What is context in c?
What is 2 d array in c?
Is c call by value?
what will be the output for the following main() { printf("hi" "hello"); }
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
What are the complete rules for header file searching?
What are the two types of structure?
Should I learn data structures in c or python?
What is the best way to comment out a section of code that contains comments?
What are the functions to open and close file in c language?
What is #include in c?