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

Explain three modes in which files can be accessed from python program

1819


Explain with examples any 2 features of OOPS.

1177


Is class is a abstract datatype in java?

2037


i want to insert textbox value to sql db. i have only one text box but store four values. ple give any one give sample code in asp.net c#..

3711


10.Define filters,binary to hexadecimal,hexadecimal to decimal?

2202


What sysoption determines where the macro facility searches a specific catalog for complied macro?

2178


5. How do you round the addition or subtraction of two numbers in assembler?

2279


What is Negative testing?

2265


what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?

2613


You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?

1124


Can any one give an example (Source Code) on virtual function implemetation in Java?

2061


How does the TCP handle the issue of multiplexing?

2930


Diff between IF and where ?

2099


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

2122


Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance

2175