Prime Number(with string)

মৌলিক সংখ্যা নির্নয় স্ট্রিং দ্বারা


#include < stdio.h >
#include < string.h >
#include < math.h >

int main()
{
    int i,j,m,num,real,dharok,two,Total=0,five,one,three;

    int strtonum,snum1,snum2;

    char ch[1000];

    scanf("%s",ch);

    m=strlen(ch);

    one = (int)ch[0]-48;

    five = ((int)ch[m-1]-48) % 5;


    for(i=0;i< m;i++)
    {
        Total += ((int)ch[i]-48);
    }
    three = Total % 3;

    two = (((int)ch[m-1])-48)%2;

    for(i=0;i< m;i++)
    {
        if(i==0)
        {
            num =(int)ch[i]-48;

            dharok = num % 7;

            num = dharok * 10;
        }
        if(i>0)
        {
            real = (int)(ch[i])-48;

            num = num + real;

            num = num % 7;
        }

    }
    strtonum = atoi(ch);

    snum1 = sqrt(strtonum);

    if(strtonum==snum1*snum1)
       printf("It is not prime %d\n",strtonum);

    else if(m==1 && (one==2||one==3||one==5||one==7))
        printf("It is prime number %s\n",ch);

    else if(m==1 && one==1)
        printf("It is not prime number %s\n",ch);

    else if(num==0||two==0||five==0||three==0)
        printf("It is not prime number %s\n",ch);

    else
        printf("It is prime number %s\n",ch);

    return 0;
}