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

How do you pass variables forwrd to future CECI sessions

4513


when will triggars the at new event in abap and web dybn pro?

1974


If i have a dataset queried from Sql and I would like to insert the dataset into a specific node in an xml document how do I do this

2159


How to call dll API sub routine in VB Form.

2366


what is dot net framework

2838


Tag for turning an image into a hyperlink is

2291


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

1100


i am exeprienced person what is selection process

1644


What is the use of Differ interface check box in Ship confirm?

2392


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

2336


How to know we are in home page of a web application using QTP

2467


What is the purpose of element of in Ajax

2480


Delta 5 weight scale not connect with oracle application what i can do?

2334


what is difference between object oriented programming structure and object oriented programming system?

1949


Write a program to show polymorphism.

1132