C programming

Sunday, January 18, 2009

#include #include void main() { clrscr(); int n,a[100],m=1,d,i,max,lcm; printf("How many number u have:"); scanf("%d",&n); printf("enter numbers:"); for(i=0;i scanf("%d",&a[i]); max=a[0]; for(i=1;i { if(max max=a[i]; } lcm=max; b: for(i=0;i { if(lcm%a[i]!=0) { m++; lcm=max*m; goto b; } } printf("LCM=%d",lcm); getch(); }

0 comments:

Visitors

PlugIn.ws - Free Hit Counter, Web Site Statistics, Traffic Analysis

  © Blogger template Leaving by Ourblogtemplates.com 2008

Back to TOP