4/06/2016

C Program For Calculate Your LOVE Percentage (LOVE METER) Using Functions

This Program Is Only Use For Fun Don't Take Personal Enjoy

#include<stdio.h>
#include<conio.h>
void main()
{

int i,l1;
long int s1,s2,t;
char name1[50],name2[50];
void title(),del();

title();

title();
printf("Please Enter your name\n");
scanf("%s",name1);

printf("Please Enter your partner's name\n" );
scanf("%s",name2);

for(i=0;i<8;i++)
{
del();
}
title();

title();

printf("\n\nPress any key to view result\n\n");

l1=0;
for(i=0;i<50;i++)
{
if (name1[i]!='\0')
{
l1++;
continue;
}
break;
}
s1=0;

for(i=0;i<l1;i++)
{
s1=s1+name1[i];
}
getch();
l1=0;

for(i=0;i<50;i++)
{
if (name2[i]!='\0')
{
l1++;
continue;
}
break;
}
s2=0;
for(i=0;i<l1;i++)
{
s2=s2+name2[i];
}
t=s1+s2;
while(t>100)
{
    t=t/10;
}
title();
printf("the result is %ld%",t);
getch();
}
void title()
{
printf("!!!!!!!!! Love Calculator !!!!!!!!!\n");
}
void del()
{
printf("..");
}


Output:-

www.programmingwithbasics.com

Ghanendra Yadav

Ghanendra Yadav

Hello, I Am Ghanendra Yadav Owner of This Blog, I am professional Blogger and Programmer. I Love Programming, Logo Making, And Banner Designing. My Highest Qualification is MCA From NIT Warangal. You Can Find Me On Social Media Through Below Link And If You Have Any Query Related To Programming And Other Subject Comment Below or You Can Mail Me I Will Try To Answer Within 24 Hours Email:- yghanendra@student.nitw.ac.in

Find me on Social Media

Facebook | Twitter | Google+ | RSS Feed

1 comment:

  1. Pls give description... And also out of value is how much?? Greatesr value we can get

    ReplyDelete