Find Namank in Numerology using C Language

We are sharing, how to find Namank in Numerology using C LanguageIn Numerlogy, Bhagyank, Mulank & Namank are important factors.

Find Mulank : The Sum of the digits of your date of birth. It also should be less than 9. For example, your date of birth is 29th, then your mulank is 2 (2+9=11, 1+1=2)

Find Bhagyank : The Sum of digits of your complete date of birth. It also should be less than 9 . For example, your date of birth is 29-10-1990, then your bhagyank is 4 (2+9+1+0+1+9+9+0=31, 3+1=4)

Find Namank : The sum of digits, that is assigned to each character for your name. Please find the following images for more details

find namank in Numerology using C Language
find namank in Numerology using C Language

Following is the code of how to find namank using C programming language

#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
int a=0,i,r=0,sum=0,t;
char str[20],ch;
clrscr();
printf("Enter String\n");
gets(str);
strlwr(str);
for(i=0;str[i]!='\0';i++)
{
	ch=str[i];
	switch(ch)
	{
	case 'a':
	case 'i':
	case 'j':
	case 'q':
	case 'y':
	a+=1;
	break;
	case 'b':
	case 'k':
	case 'r':
	a+=2;
	break;
	case 'c':
	case 'g':
	case 'l':
	case 's':
	a+=3;
	break;
	case 'd':
	case 'm':
	case 't':
	a+=4;
	break;
	case 'e':
	case 'h':
	case 'n':
	case 'x':
	a+=5;
	break;
	case 'u':
	case 'v':
	case 'w':
	a+=6;
	break;
	case 'o':
	case 'z':
	a+=7;
	break;
	case 'f':
	case 'p':
	a+=8;
	break;
	default:
	printf("thanks");
	break;
	}
}
printf("%d\n",a);
if(a>9)
{
t = a;
   while (t != 0) /*login to find namank*/
   {
      r = t % 10;
      sum       = sum +r;
      t         = t / 10;
   }
   printf("Sum of digits of %d = %d\n",a,sum);
}
getch();
}