Thursday, June 10, 2010

Engineering Counselling Tips

Rating about Courses in B.E/B.Tech Below:
ECE GOOD
CSE GOOD
IT GOOD
EEE GOOD
MECH GOOD
PROD GOOD
BT GOOD
All other engineering-related courses....R EQUALLY GOOD.... Done in a hurry but the information is true.... for any suggestions and clarifications regarding counselling n engg admissions feel free to write in to me dinecents@gmail.com.. Professional Guidance ll be Given

to find an element in a matrix whose elements r sorted row-wise n column-wise

int search(int **matrix,int x,int m,int n)
{
// x element to be searched m,n row n column indices
int row= m-1 , col = 0;
while( row >=0 && col < n)
{
if(matrix[row][col]==x)
return true;
else if(matrix[row][col] > x) row--;
else col++;
}
return false;
}

Wednesday, June 2, 2010

A Dream come true For Him


LCM of Two Numbers- C Code

int lcm(int m, int n)
{
int q=1,i=2,a,b;
for(i=2; i<=m (or) i <= n; i++)
if( isprime(i))
{
a = i^a divides m such that a is maximum;
b = i^b divides n such that b is maximum;
q = q* i^max(a,b);
}
return q;
}