Posts

Showing posts with the label Numerology

Numerology program

#include<stdio.h> #include<string.h> int recc(int); void info(); int main(){ int val,y,total=0; puts("Numerology\nEnter your name :"); char a[2003]; gets(a);  y = strlen(a); //printf("length of string is %d\n\n",y); printf("\nEntered name is %s\n\n",a); for(int r=0;r<y;r++){ switch(a[r]){ case 'a': case 'i': case 'j': case 'q': case 'y': case 'A': case 'I': case 'J': case 'Q': case 'Y':  val =1; break; case 'b': case 'k': case 'r': case 'B': case 'K': case 'R':  val =2; break; case 'c': case 'g': case 'l': case 's': case 'C': case 'G': case 'L': case 'S':  val =3; break; case 'd': case 'm': case 't': case 'D': case 'M': case 'T':  val =4; break; case 'e': case 'h': case 'n': case &#