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 / sudhir

int gcd(int a, int b)
{
if (a==0 && b==0) return -1;
if (b==0) return a;
return gcd(b,a%b);
}


int lcm (int a, int b)
{
return (int) (a*b)/gcd(a,b);
}

Is This Answer Correct ?    22 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is dialog programming?

2045


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

2125


what is the extension of SPDS Dynamic cluster tables?

2159


what is web configuration file

2073


what is client server & server? What r types of Joins? explsin it! which types of indexex in sql server? what is triggers?

2047


can we allocate memory for interface? if no then why?

1914


1. Consider the following input and generate the object code using single pass assembler. JOHN START 0 USING *,15 L 1,FIVE A 1,FOUR ST 1,TEMP FOUR DC F’4’ FIVE DC F’5’ TEMP DS ‘F END

2829


Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com

2181


how to stop execution of step 3 in a job mainframe

2158


Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,

2310


How to print No.of.rows affected after updation using ADO.Net

2885


What is SAP TAO? · Which Version you are using? · What is the Latest Version in SAP TAO? · What are the Advantages in SAP TAO? · What are the Patches required for SAP TAO? · What is BPT? · Difference between BPT & SAP TAO? · Which Framework using for SAP TAO? · What is CBASE? · What is the SAP TAO Architecture? · What are the Prerequisites for SAP TAO? · SAP Solution Manager Mandatory for SAP TAO 1.0? · SAP Solution Manager Mandatory for SAP TAO 2.X? · What is UI Scanner? · What is Inspector? · How many ways to Create a components using TAO 1.0? · How many ways to Create a components using TAO 2.x? · Which service pack required for SAP TAO 2.7? · What is Import/Export? · What is Consolidate?

2911


how to work search engine? plz detail answer me.

1862


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

4579


pleasew define carrier scope in abap (sap).

2662