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
What is dialog programming?
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
what is the extension of SPDS Dynamic cluster tables?
what is web configuration file
what is client server & server? What r types of Joins? explsin it! which types of indexex in sql server? what is triggers?
can we allocate memory for interface? if no then why?
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
Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com
how to stop execution of step 3 in a job mainframe
Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,
How to print No.of.rows affected after updation using ADO.Net
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?
how to work search engine? plz detail answer me.
how to add Servlet-api.jar file into eclipse 3.3.2 ?
pleasew define carrier scope in abap (sap).