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

what are resources in case of Threads

2209


I am work in it aompenei

1386


how to add Servlet-api.jar file into eclipse 3.3.2 ?

4511


What do you understand by modular programming?

1083


How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?

1944


Difference between views and index in sas programming

1455


Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.

2994


will it allow to add same value in HashMap class.

2069


EXPLAIN UNARY OPEARATORS

2188


8.In DSP,Define Signal and System?and various type of signals.

1975


hoe to data grid use in sql server 2000?

2026


Any real time example of O2C process from taking order till creating invoice.

2303


how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there

2157


Is there any standard procedure to test the application as a whole? Or How can I test complete application right from the requirement gathering?

1875


As per interoperatbility programs written in one language can be used by other language. How can we restrict the features of one language (say C#) in the programmer written in another language (say VB)..for example we have some features like operator overloading which is possible C#.NET (not in VB.NET), how can we restrict that when we are using this code in VB.NET.

1887