C Language Love Calculator Program Error

Hello this is Gulshan Negi
Well, I am writing a program for creating a love calculator in C, but it shows some error at the time of execution, and I don’t know what I am missing.
Source Code:

#include<ctype.h>
#include<stdio.h>
#include <conio.h>
#include<string.h>

int Sum_of_Digits(int digit)
    {
       int sum =0;
       while(digit > 0)
          {
              sum +=(digit%10);
              digit/=10;
          }
        return sum;
    }

void main()
 {
      char name[100], partner[100];
      int p,ns = 0, ps =0,love =54,i,j,love_percentage, opt;
      clrscr();

     do
     {
         printf("Enter Your Name: ");
         gets(name);

         printf("Enter Your Partner Name: ");
         gets(partner);

         for(i =0, i<strlen(name); i++)
            {
               ns += (tolower(name[i])-96);
            }

         for(j = 0; partner[j] != '\0'; j++)
            {
                ps+=(tolower(partner[j])-96);
            }
          p= Sum_of_Digits(ns);
          love_percentage = (Sum_of_Digits(ns)+Sum_of_Digits(ps)+love);
          printf("The Love Percentage is %d", love_percentage);
          printf("\nPress 1 To continue or 0 to Exit");
          scanf("%d",&opt);

    }while(opt!=0);
    getch();
}

I also checked and took a reference from here, but I don’t know what I am missing in code.
Can anyone give their suggestions on this?
Thanks

What error are you getting?

Edit: First, I don’t know how you even got this to compile on a Mac with the conio stuff in there.

Second, if you’re asking about the message about gets, do what the Xcode warnings suggest and replace those calls with fgets:

     printf("Enter Your Name: ");
     fgets(name, sizeof(name), stdin);

     printf("Enter Your Partner Name: ");
     fgets(partner, sizeof(partner), stdin);

The reason for the warning is that gets has no upper limit on how many characters it will read. name and partner are only 100 character arrays, but there’s nothing stopping the user from typing in more than 100 characters and gets will write them all into the variable, running past the end of the array. Maybe this just crashes your program, but this is the kind of buffer overrun that in the worst case scenario can allow hackers to break in to computers.

By using fgets instead, you can tell it to only read as many characters as the array can hold so it won’t write past the end of the array.

First of all, thanks a lot for your kind response. Well, I will try what you have suggested.
Thanks again.