T-5(1) - #include<stdio.h> #include<conio.h>...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include<stdio.h> #include<conio.h> void acc(int []); void dec(int []); void main (void) { int A[10],a; clrscr(); for(a=0;a<10;a++) { printf("Enter the value of %d:",a+1); scanf("%d",&A[a]); } acc(A); dec(A); getch(); } void acc(int A[]) { int a,b,temp; for(b=0;b<10;b++) for(a=0;a<9;a++) if(A[a+1]<A[a]) { temp=A[a+1];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/06/2010 for the course UBIT 411 taught by Professor Saleemelahi during the Spring '10 term at University of Karachi.

Ask a homework question - tutors are online