Laplace transforms pdf

CLICK THE LINK BELOW TO DOWNLOAD LAPLACE TRANSFORMS IMPORTANT FORMULAS IN THE FORM OF PDF

CLICK HERE

Friday, 29 July 2016

Selection sorting

/*SELECTION SORT (ASCENDING AND DESCENDING ORDER ORDER) */
#include<stdio.h>
void main()
{
int n,a[1000],i,j,t,m,l;
printf("enter the number of numbers that are to be sorted\n");
scanf("%d",&n);
printf(" enter the elements of the array\n"); for(i=0;i<n;i++)
scanf("%d",&a[i]);

for(i=0;i<n;i++)
	  {
	  	t=i;
	  	for(j=i;j<n;j++)
	  	if(a[t]>a[j])
	  	 {
	  	 	t=j;
	  	 }
	  	if(t!=i)
	  	{
		  
		m=a[i]; 	
		a[i]=a[t];
		a[t]=m;
	    }
		
		
	  }

printf("\n ASCENDING ORDER :\n"); for(i=0;i<n;i++)
printf(" %d ",a[i]);
printf("\n DESCENDING ORDER:\n"); for(i=n-1;i>=0;i--)
printf(" %d ",a[i]);
}

PROGRAM TO CHECK WHETHER THE GIVEN SUDOKU PUZZLE ANSWER IS CORRECT OR NOT

/*Check whether the given filled sudoku puzzle is correct or not */

#include<stdio.h>
#include<conio.h>
void main()
{
int a[9][9],sum1,sum2,flag=0,i,j;      printf("Enter the elements of sudoku Row wise\n");
for(i=0;i<9;i++)
for(j=0;j<9;j++)
scanf("%d",&a[i][j]);
for(i=0;i<9;i++)
{
sum1=0;
sum2=0;
for(j=0;j<9;j++)
{
sum1+=a[i][j];
sum2+=a[j][i];
}
if(sum1!=45 || sum2!=45)
{
flag=1;
break;
}
}
for(i=0;i<9;i++)
{
for(j=0;j<9;j++)
printf(" %d ",a[i][j]);
printf("\n\n");
}
if(flag==1)
printf("\n----THE PUZZLE IS WRONG---\n"); else
printf("\n----THE PUZZLE IS RIGHT---");
}