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
along with oracle which language will be beneficial to have knowledge with,java,.net,since i m doing oracle have appeared for 8th sem BEIT,plz suggest
Explain the types of operations? Draw the figure for shift and rotate operations?
i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared
What is the difference between WebIntelligence and Designer in creating universes?
Which method protects back button to retrieve old value from previous page in Struts.
how CLR identify vb file?
Iam using Microsoft Visual Studio to create a system for mobile store I want to know how to calculate mobile price that the customer buy and how to reduce quantity from the data base that we have for mobile .And also how to calculate revnue for each mobile and revnue for the total mobile
is it possible to learn sap from book without any tutorial. if yes please mention the beginner,s book of sap and also make your valuable advice for self study of sap .
I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!
how to study PHP my own? i reffered many sites.. but as being a fresher i couldnt follow those... which site will be the best one?
Delta 5 weight scale not connect with oracle application what i can do?
What is ur porject Architecture? If anyone ask what i have to specify here..
How to call a C++ function which is compiled with C++ compiler in C code?
hi all, i need ur help in preparing a sql which performs scd2, i mean i have a scd2 mapping i need a sql which can give me same result as scd2 mapping, SRC table: cust_no, loc 01 abc 02 xyz TGT table: pm_ky cust_no loc current_flag 1 01 abc Y 2 02 xyz Y cust 1 has changed his loc to xyz then it loads into TGT table as below, pm_ky cust_no loc current_flag 1 01 abc N 2 02 xyz Y 3 01 xyz Y i need sql to get the above result, hope got me question, Any suggestion will be appreciate.. thanks, Vinod
Need guidewire related Documents(Interview Question/Tips/Best Practice/Dumps)