fork download
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<string.h>
  4.  
  5. void main()
  6. { char str1[20];
  7. char str2[20];
  8. int x,y,n,r,counter1,counter2,points=0;
  9.  
  10. clrscr();
  11. printf ("Please enter a name: \n\n");
  12. gets(str1);
  13.  
  14. printf ("\nEnter another name: \n\n");
  15. gets(str2);
  16.  
  17. counter1=strlen(str1);
  18. counter2=strlen(str2);
  19.  
  20. for (x=0; x<counter1; x++)
  21. { for (y=0; y<counter2; y++)
  22. { if (str1[x]==str2[y])
  23. points++;
  24. else;}
  25.  
  26. if(points!=0)
  27. points++;
  28. }
  29.  
  30. for (n=1; n<counter1; n++)
  31. { if (str1[0]==str1[n])
  32. points++;
  33. else;}
  34.  
  35. printf ("\n%d \n",points);
  36.  
  37. r=points%6;
  38. switch®
  39.  
  40. {
  41. case 1: printf ("\nFriends"); break;
  42. case 2: printf ("\nLovers"); break;
  43. case 3: printf ("\nAnger"); break;
  44. case 4: printf ("\nMarriage"); break;
  45. case 5: printf ("\nEngaged"); break;
  46. case 0: printf ("\nSweethearts"); break;
  47. }
  48.  
  49.  
  50.  
  51. getch();
  52. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c:2:18: fatal error: conio.h: No such file or directory
compilation terminated.
stdout
Standard output is empty