prev | Switch-case 66.Position of Biggest of ten numbers using integer array (04.03.2010) /* Program# 66 date : 28-12-2008 Position of biggest 10 nos - Integer Array */ #include <stdio.h> main(){ int i=0,a[10]; int big=0,pos=-1; while(i<10){ scanf("%d",&a[i]); i=i+1; } i=0;big=a[0]; while(i<10){ if(a[i]>big){ pos=i; big=a[i]; } i=i+1; } printf("\n biggest no: %d Position:%d",big,pos); } |
next |