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.

Thursday, June 2, 2011

TO FIND WORK DONE BY A FORCE

0 comments
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a1,a2,a3,f1,f2,f3,w;
printf("Enter the coefficients of force");
scanf("%d%d%d",&f1,&f2&f3);
clrscr();
printf("Enter the components of displacement\n");
scanf("%d%d%d",&a1,&a2,&a3);
w=a1*f1+a2*f2+a3*f3;
printf("Work done by the force is %d",w);
getch();
}






Algorithm:


1.Start
2.Read components of force,f1,f2,f3
3.Read components of displacement a1,a2,a3
4.Calculate the work done w=a1*f1+a2*f2+a3*f3
5.print work done
6.stop
Continue reading →

Algorithm of Matrix multiplication

0 comments
1.Start
2.If(n not equal to p) goto step3 else goto step4
3.Print "Matrices not compatible" goto step36
4.If(n=p) goto step5 else goto step11
5.Assign i=1
6.If i<=n then i=1 and goto7 else goto11
7.If j<=n then goto8 else goto10
8.Read a[i][j]
9.Assign j=j+1 goto step7
10.Assign i=i+1 goto step6
11.Assign i=1
12.If i<=p then j=1 and goto 13 else goto14
13.If j<=q then goto12 else goto16
14.Read b[i][j]
15.Assign j=j+1 goto step13
16.Assign i=i+1 goto step12
17.Print "The product of two matrices A anb B are "
18.Assign i=1
19.If i<=m then j=1 and goto step20 else goto step24
20.If j<=q then k=1 and goto step21 else goto step23
21.Assign c[i][j]=0,if k<=n and k=k+1 goto step21 else goto22
22.j=j+1 goto step20
23.i=i+1 goto step19
24.Assign i=1
25.If i<=n then j=1 and goto26 else goto31
26.If j<=q then k=1 and goto27 else goto30
27.If k<=n then assign c[i][j]=a[i][j]*b[i][j]
28.k=k+1 goto step27
29.j=j+1 goto step26
30.i=i+1 and goto step25
31.Assign i=1
32.If i<=n,i=1 and goto33 else goto32
33.If j<=q goto step34 else goto35
34.Print c[i][j],j=j+1 and goto step33
35.i=i+1 goto step32
36.stop
Continue reading →
Wednesday, June 1, 2011

To Perform Matrix Multiplication in C

0 comments
/*To perform matrix multiplication*/
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int p,q,m,n,i,j,k;
int a[25][25],b[25][25],c[25][25];
/*Enter the order of matrices*/
printf("Enter the order of matrix A (m,n)\n");
scanf("%d%d",&m,&n);
printf("Enter order of matrix B (p,q) \n");
scanf("%d%d",&p,&q);
if(n!=p)
{
printf("matrices not compatible");
}
if(n==p)
{
/*Enter the elements of matrices*/
printf("enter the elements of matrix A");
for(i=1;i<=m;i++)
{
for(j=1;j<=n;j++)
{
scanf(%d",&a[i][j]);
}
}
printf("enter the elements of B");
for(i=1;i<=p;i++)
{
for(j=1;j<=q;j++)
{
scanf("%d",&b[i][j]);
}
}
printf("The product of two matrices A&B \n");
for(i=1;i<=m;i=i+1)
{
for(j=1;j<=q;j=j+1)
{
for(k=1;k<=n;k=k+1)
{
c[i][j]=0;
}
}
}
for(i=1;i<=m;i=i+1)
{
j=1;j<=q;j=j+1)
{
for(k=1;K<=n;k=k+1)
{
c[i][j]=c[i][j]+(a[i][k]*b[k][j]);
}
}
}
for(i=1;i<=m;i++)
{
for(j=1;j<=q;j++)
{
printf("%d",c[i][j]);
}
printf("%d",c[i][j]);
}
}
getch();
}


Click here for Algorithm of Matrix multiplication
Continue reading →