Saturday, May 24, 2014
Codes of FLAMES in Turbo C
#include<stdio.h>
#include<string.h>
main()
{
char word[100];
char word2[100];
int x,y,a,b,count = 0, flag = 0;
int m,n,div;
clrscr();
printf("Enter name of boy: ");
gets(word);
printf("\nEnter name of girl: ");
gets(word2);
x = strlen(word) - 1;
y = strlen(word2) - 1;
for(a=0;a<=x;a++)
{
for(b=0;b<=y;b++)
{
if(word[a]==word2[b])
{
flag = 1;
}
}
if(flag == 1 )
{
count = count + 1;
}
flag = 0;
}
for(b=0;b<=y;b++)
{
for(a=0;a<=x;a++)
{
if(word2[b]==word[a])
{
flag=1;
}
}
if(flag==1)
{
count = count + 1;
}
flag = 0;
}
printf("\n");
if(count > 6)
{
div = count%6;
if(div==1)
{
printf("FRIENDS");
}
if(div==2)
{
printf("LOVERS");
}
if(div==3)
{
printf("ACCEPTED");
}
if(div==4)
{
printf("MARRIED");
}
if(div==5)
{
printf("ENEMIES");
}
if(div == 0)
{
printf("SOULMATES");
}
}
else if(count<=6)
{
if(count ==1)
{
printf("FRIENDS");
}
if(count==2)
{
printf("LOVERS");
}
if(count==3)
{
printf("ACCEPTED");
}
if(count==4)
{
printf("MARRIED");
}
if(count==5)
{
printf("ENEMIES");
}
if(count == 6)
{
printf("SOULMATES");
}
}
count = 0;
getch();
return 0;
}
Subscribe to:
Post Comments (Atom)
Part 7. Commercial Law. Piercing the viel. Solidary liability
Because a corporation’s existence is only by fiction of law, it can only exercise its rights and powers through its directors, officers, or...
-
Adding a network printer in Linux Mint is easy. Just follow the following instructions to be able to connect to your network printer: 1. ...
-
There are really a lot of ways on how to answer bar examinations. But exploring these different versions in the actual bar exams may not be ...
-
#Uber #Grab Why grow interest upon the issues below? Well, this will help us enlighten our minds on how the modern world has grown so m...
No comments:
Post a Comment