Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a Pseudo Code to fins the LCM of two given numbers

Answer Posted / zain

#include<iostream>
using namespace std;
int LCM(int a,int b);
int main()
{
int a,b;
cout<<" ENTER TWO NUMBER : ";
cin>>a>>b;
cout<<"\n\n LCM : "<<LCM(a,b);
system("pause");
return 0;
}
int LCM(int a,int b)
{
int n;
for(n=1;;n++)
{
if(n%a == 0 && n%b == 0)
return n;
}
}

Is This Answer Correct ?    49 Yes 23 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

any drawback are there in mantis?

2136


what is the current salary package in India for a lamp programmer

2313


How to get the index of the clicked field in reports in ABAP?

1680


in a VB application, where the data will be stored after manipulation? what is the syntax for that?

2261


how CLR identify vb file?

3022


what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!

3312


what is the use MDM(Master Data Management)and meaning

2399


Find out the roles which gives access to all tables in SAP? Thanks in advance.

2013


can we retrieve only integer/String type columns from a table,if yes how?

1916


what is the BAM? where we can use it in BizTalk server?

1796


Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod

1964


1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?

2356


what is the diffrence between software and hardware language?

2287


what will we require to build project with the help of oracle

1827


can any one suggestion me present which course(except java,.net) has huge demand in the market?

2041