// // max_nextmax.c // // // Created by Bibhas Ghoshal on 03/06/22. // #include int main() { int n, m, max, nextmax, i , num; /* Read N */ printf("Give n:"); scanf("%d",&n); printf("\n n = %d \n",n); /* Initialize */ scanf("%d%d",&max,&nextmax); if(max= max){ nextmax=max; max = num;} else if(num>nextmax) nextmax = num; } /* Print Result */ printf("\n MAX = %d, NEXTMAX=%d \n", max,nextmax); } int swap(i,j) int *i,*j; { int temp; temp =*i; *i=*j; *j=temp; }