Who's Online

We have 31 guests and 1 member online

Login Form



RSS FEEDS



LCM of Two Nos PDF Print
User Rating: / 1
PoorBest 
Program Codes - C++ Programming
Written by Mansoorkhan   
Friday, 06 November 2009 03:13

#include
#include
main()
{
int a,b,t,i=1;;
clrscr();
printf("Enter Two Nos : ");

scanf("%d%d",&a,&b);
if(b>a)
{
t=a;
a=b;
b=t;
}
for(i=1;i<=a;i++)
{
if((i*b)%a==0)
{
printf("LCM = %d",i*b);
break;
}
}
getch();
}

AddThis Social Bookmark Button
 

Copyright Disclaimer: This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.Thanks to Getkerala

For Latest Technology News and computer tips and tricks