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

SIMPLE CALCULATOR

0 comments
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
char opr;
int a,b;
float result=0;
clrscr();
printf("Enter the first number:");
scanf("%d",&a);
printf("Enter the second number:");
scanf("%d",&b);
printf("Enter the operator:");
scanf("%s",&opr);
switch(opr)
{
case'+':
result=a+b;
break;
case'-':
result=a-b;
break; 
case'*':
result=a*b;
break; 
case'/':
result=a/b;
break; 
case'%':
result=a%b;
break;
default:
printf("You are entered a invalid operator");
break;
}
printf("The result of %d %c %d is= %f",a,opr,b,result);
getch();
}



Continue reading →

TO CHECK GIVEN NUMBER IS PALINDROME OR NOT

0 comments
#include<stdio.h>
#include<conio.h>
void main()
{
int num,sum=0,r,temp;
clrscr();
printf("Enter the number:");
scanf("%d",&num);
temp=num;
while(num)
{
r=num%10;
num=num/10;
sum=sum*10+r;
}
if(temp==sum)
printf("The given number is palindrome");
else
printf("The given number not palindrome");
getch();
}



Continue reading →

MEAN AND STANDARD DEVIATION

0 comments
#include<stdio.h> 
#include<conio.h>
#include<math.h> 
void main()
{
int n,a[25],i;
float sum=0,sos=0,q,m,sd;
clrscr();
printf("Enter the total number of elements:");
scanf("%d",&n);
printf("Enter the elements");
for(i=1;i<=n;i++)
{
scanf("%d",&a[i]);
sum=sum+a[i];
sos=sos+a[i]*a[i];
}
m=sum/n;
q=sos/n;
sd=sqrt(q-m*m);
printf("The mean of given numbers is=%f",m);
printf("Standard deviation is =%f",sd);
getch();
}




Algorithm:

1.Start.
2.Read n.
3.assign i=1,sum=0,sos=0
4.If i<=n goto step5 else goto step9.
5.Read a[i]
6.Compute sum=sum+a[i]
7.Compute sos=sos+a[i]*a[i]
8.Assign i=i+1 goto step4.
9.compute m=sum/n
10.Compute q=sos/n
11.Compute sd=sqrt(q-m*n)
12.Print m,sd
13.Stop
Continue reading →