Earn by twitter on twivert

Sign up for PayPal and start accepting credit card payments instantly.

Saturday, May 15, 2010

WAP to multiplication of 2 matrix


/*WAP to multiplication of 2 matrix*/

#include<stdio.h>
#include<conio.h>
void main()
{
int a[2][2],b[2][2],c[2][2],i,j,k;
clrscr();
printf("enter 1 matrix");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("enter 2 matrix");
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
scanf("%d",&b[i][j]);
}
}
for(i=0;i<2;i++)
{
for(j=0;j<2;j++)
{
c[i][j]=0;
for(k=0;k<2;k++)
c[i][j]=c[i][j]+a[i][k]*b[k][j];
}
}
printf("multiplication of 2 matrix");
for(i=0;i<2;i++)
{
printf("\n");
for(j=0;j<2;j++)
{
printf("%d\t",c[i][j]);
}
}
getch();
}

Saturday, May 8, 2010

Pascal shape


/*Pascal shape*/

#include<stdio.h>
#include<conio.h>
main()
{
int i,j;
clrscr();
for(i=1;i<=5;i++)
{
for(j=i;j<5;j++)
printf(" ");
for(j=1;j<=2*i-1;j++)
printf("*");
printf("\n");
}
getch();
}

Friday, May 7, 2010

WAP check highest or lowest array element


/*WAP check highest or lowest array element*/

#include<stdio.h>
#include<conio.h>
void main()
{
int array[5],min,max,i;
clrscr();
printf("enter value of array");
for(i=1;i<=5;i++)
scanf("%d",&array[i]);
min=max=array[0];
for(i=1;i<=5;i++)
{
if(array[i]>min)
max=array[i];
else
if(array[i]<max)
min=array[i];
}
printf("\nhighest element is: %d\n",max);
printf("\nlowest element is: %d\n",min);
getch();
}

Wednesday, May 5, 2010

wap to display series 2,4,6,8,10 using "for loop"


/*wap to display series 2,4,6,8,10 using "for loop"*/

#include<stdio.h>
#include<conio.h>
void main()
{
int i,n=2,ser;
clrscr();
for(i=1;i<=5;i++)
{
ser=n*i;
printf("\n%d",ser);
getch();
}
}

ADS

How to earn online

How to earn online:
Step - 1 :
signup for PayPal, to recieve your online earning
click here:
https://www.paypal.com/in/mrb/pal=CZ7224TZBMCBL
step - 2 : Singup these 4 sites & earn & enjoy! Read site to know how to earn.
1. trekpay
Earn up to $0.02 (2 cents) per click.
http://www.trekpay.com/?ref=34690
2. neobux
Earn up to $0.02 (2 cents) per click.
Click here:
http://www.neobux.com/?r=Moneyearner786

AddMe

Bookmark and Share