View Code of Problem 75

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

Double click to view unformatted code.


Back to problem 75