prev


for loop

121.Position of Biggest & smallest of 10 nos - integer array(03.08.2010)

/*
Program# 121
date : 14-01-2009
Position of Biggest & smallest of 10 nos - integer array
*/

#include <stdio.h>
main(){
int i,a[10],bpos,spos;
spos=0;
bpos=0;
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for(i=0;i<10;i++){
bpos=(a[i]>a[bpos])?i:bpos;
spos=(a[i] } printf("\n big & small postion are %d %d",bpos,spos);
}



next
blog comments powered by Disqus