Skip to main content

777

HTML
<p>#include
int main()
{
int i,j,n,a[100],temp;
printf("enter the number of elements");
scanf("%d",&n);
printf("enter the elements\n");
for(i=0;i scanf("%d",&a[i]);
for(i=0;i{
for(j=0;j{
if(a[j]>a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("sorted arry\n");
for(i=0;iprintf("%d\t",a[i]);
return 0;
}
</p>

Comments

Popular posts from this blog

Raju is a Civil Engineer. He is writing software to automate his work. As a part of his requirement, he wants to calculate the circle diameter, circumference, and area. Help Raju to complete his task. Get radius as input.

OUTPUT

Seetha, a maths teacher has started to learn the C programming language. She writes a program to do basic arithmetic operations. Help Seetha to complete her first program.

OUTPUT