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.

Monday, August 16, 2010

TO SORT A SET OF NUMBERS IN ASCENDING ORDER

0 comments
#include<stdio.h>
#include<conio.h>
void main()
{
int a[100],l,i,j,k;
printf("Enter the limit:");
scanf("%d",&l);
for(i=0;i<l;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<l;i++)
{
for(j=0;j<l;j++)
if(a[i]<a[j])
{
k=a[i];
a[i]=a[j];
a[j]=k;
}
}
for(i=0;i<l;i++)
printf("%d",a[i]);
getch();
}
Continue reading →

SUM AND AVERAGE OF EVEN NUMBERS WITHIN THE LIMIT

0 comments
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int i,lower,upper,sum=0,count=0,temp;
float average;
clrscr();
printf("Enter the lower limit: ");
scanf("%d",&lower);
printf("Enter the upper limit: ");
scanf("%d",&upper); 
if(lower>upper)
{
temp=lower;
lower=upper;
upper=temp;
}
for(i=lower+1;i<upper;i++)
{
if(i%2==0)
{
sum=sum+i;
count++;
}
}
average=sum/count;
printf(" Sum of even numbers between %d and %d is=%d ",lower,upper,sum);
printf(" Average is=%f",average);
getch();
}
Continue reading →

TO CHECK GIVEN STRING IS PALINDROME OR NOT

0 comments
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char str[100];
int a,b,c=0,i,j,l;
printf("Enter your string:");
gets(str);
l=strlen(str);
j=l-1;
for(i=0;i<j/2;i++,j--)
{
if(str[i]==str[j])
{
c=1;
}
}
if(c==1)
printf("The string is palindrome");
else
printf("The string is not palindrome");
getch();
}
Continue reading →