C Program for "FLAMES"
C Program for "FLAMES"
#include
#include
#include
void main()
{
int x,y,z,i,j,r,s,g,h;
char name1[22],name2[22],a[11]=
{' ','f','l','a','m','e','s'},b[11];
clrscr();
printf("Enter the name 1:");
scanf("%s",name1);
printf("Enter the name2:");
scanf("%s",name2);
x=strlen(name1);
y=strlen(name2);
z=x+y;
for(i=0;i1;r--)
{
s=z%r;
if(s==0)
{
s=r;
i=1;
}
else
{
a[s]='/o';
i=s+1;
}
j=1;
while(1)
{
if(i==s)
{ break;}
b[j]=a[i];
if(i==r)
{ i=0;}
i++;
j++;
}
for(i=1;i<=r-1;i++)
{
a[i]=b[i];
}
}
printf("\nRelationship status:");
switch(a[1])
{
case 'f':
printf("FRIENDSHIP");
break;
case 'l':
printf("LOVE");
break;
case 'a':
printf("AFFECTION");
break;
case 'm':
printf("MARRIAGE");
break;
case 'e':
printf("ENMITY");
break;
case 's':
printf("SISTER");
break;
}
getch();
}
Comments
Post a Comment