answersLogoWhite

0

AllQ&AStudy Guides
Best answer

Ján Levoslav Bella was born in 1843.

This answer is:
Related answers

Ján Levoslav Bella was born in 1843.

View page

Ján Levoslav Bella died in 1936.

View page

Bella J. May has written:

'Home Health and Rehabilitation'

View page

/* Bubble sort:

code snippet only

nos to be sorted are in the array named 'n' of size 'N'

for(int i=0;i<N-1;i++)

for(int j=i+1;j<N-1-i;j++)

if(n[j]>n[j+1])

swap(n[j],n[j+1]);

*/

/*

insertion sort

int v,j;

for(int i=1;i<N;i++)

{

v=n[j];

for(int j=i-1;j>0&&n[j]>v;j--)

n[j+1]=n[j];

n[j+1]=v;

}

*/

View page

#include<stdio.h>

int main()

{

int n,i,j,k,a[10][10];

printf("\nEnter the number of nodes: ");

scanf("%d",&n);

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

printf("\nEnter the distance between the host %d%d:", i+1,j+1);

scanf("%d",&a[i][j]);

}

}

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

printf("%d\t",a[i][j]);

printf("\n");

}

for(k=0; k<n; k++)

{

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

if(a[i][j]>a[i][k]+a[k][j])

a[i][j]=a[i][k]+a[k][j];

}

}

}

for(i=0; i<n; i++)

{

for(j=0; j<n; j++)

{

b[i][j]=a[i][j];

if(i==j)

b[i][j]=0;

}

}

printf("\nThe output matrix is:\n");

for(i=0;i<n;i++)

{

for(j=0;j<n;j++)

printf("%d\t",b[i][j]);

printf("\n");

}

return 0;

}

View page
Featured study guide
๐Ÿ““
See all Study Guides
โœ๏ธ
Create a Study Guide
Search results