prev


Integer Arrays

67.Position of Biggest and smallest of ten numbers using integer array (08.03.2010)

/*
Program# 67
date : 28-12-2008
Position of biggest & smallest 10 nos - Integer Array
*/

#include <stdio.h>
main(){
int i=0,a[10];
int small=0,big=0,bpos=-1,spos=-1;

while(i<10){
scanf("%d",&a[i]);
i=i+1;
}
i=0;big=a[0];
small=a[0];
while(i<10){
if(a[i]>big){
bpos=i;
big=a[i];
}
else
if(a[i]



next
blog comments powered by Disqus