ALT_IMG

You are the cause of my pain

You are the cause of my pain, yet the love I feel for you is my only consolation, my only cure..

ALT_IMG

Saw the girl, whom once I thought as my best friend

Remembering my classmates, after few years, My eyes were filled with tears, Everyone is busy a lot, No one escaped destiny's plot, Saw the girl, whom once I thought as my best friend, Today she is some body else's girl friend, After months remembered about her for a little while, Heard she is happy, that made me smile.

Alt img

It’s been raining since you left me

It’s been raining since you left me, now I’m drowning in the flood. You see, I’ve always been a fighter, but without you I give up.

ALT_IMG

Sweet Heart

Sweetheart.....I miss ......THe whisper of your voice...The warmth of your touch and all the wonderful times that we shared together.......

ALT_IMG

When I see you

When I see you smile and know that it's not for me, that's when I miss you the most.

Tuesday, August 10, 2010

TO FIND FIBONACCI SERIES USING C PROGRAM

0 comments
#include<stdio.h>
int main()
{
int n,r,ncr;
printf("Enter any two numbers-->");
scanf("%d",&n,&r);
ncr=fact(n)/(fact(r)*fact(n-r));
printf("The NCR factor of %d and %d is %d",n,r,ncr);
return 0;
}
int fact (int n)
{
int i=1;
while(n!=0)
{
i=i*n;
n--;
}
return i;
}
Continue reading →

BINARY TO DECIMAL CONVERSION

0 comments


#include<stdio.h>
#include<stdio.h>  
#include<stdio.h>
void main()
{
int i=0,num,decimal=0;
long n;
printf("Enter the binary number:");
scanf("%d",&n);
while(n>0)

num=n%10;
decimal=decimal+num*pow(2,i);
n=n/10;
i=i+1;
}
printf("The decimal number is %d",decimal);
getch();
}







Algorithm:

1.Start.
2.Read the binary number,n
3.Calculate ai2n-1+ai2n-2+ai2n-3+..................+ai2
4.Print the decimal equivalent of the binary.
5.Stop.
Continue reading →

DECIMAL TO BINARY CONVERSION

0 comments
#include<stdio.h>
#include<conio.h>
#include<math.h> 
void main()
{
int bin[10],i,j,N;
printf("Enter the decimal number:");
scanf("%d",&N);
i=0;
while(N>0)
{
bin[i]=N%2;
N=N/2;
i=i+1;
}
printf("The binary number is:");
for(j=i-1;j>=0;j--)
{
printf("%d",bin[j]);
}
getch();
}






Algorithm:

1.Start.
2.Read the decimal number.
3.Calculate the binary number using double-dabble method.
4.Print the binary equivalent of the decimal.
5.Stop.



Continue reading →