View Code of Problem 75

#include <stdio.h>
int main()
{
	int a[20];
	int i;
	int min;
	int temp;
	int j; 
	for(i =0;i<10;i++)
	{
		scanf("%d",&a[i]);
	 } 
	for(i = 0;i<9;i++)
	{
		  for(j = i+1;j<10;j++)		
		{
			if(a[i]>a[j])
			{
			 temp = a[i];
			 a[i] = a[j];
			 a[j] = temp;
		    }
			
		}
	}
	for(i= 0;i<10;i++)
	{printf("%d\n",a[i]);
	}
	
/*
Main.c: In function 'main':
Main.c:28:2: error: expected declaration or statement at end of input
  }
  ^
Main.c:6:6: warning: unused variable 'min' [-Wunused-variable]
  int min;
      ^
*/

Double click to view unformatted code.


Back to problem 75