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
what is difference between object oriented programming structure and object oriented programming system?
Is anyone has done the ASP.NET MVC4 workshop course(2 days) from Peers Technologies. Let me know. I need to talk before joining ASP.NET MVC4 training at peers, Hyderabad.
which worker is involved in all the phases of SDLC?
Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage
how can i create report in abap to insert data in table pa0002 using insert command
could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks
can any one suggestion me present which course(except java,.net) has huge demand in the market?
What sysoption determines where the macro facility searches a specific catalog for complied macro?
What is WEB 3.0? What are the features their in WEB3.0
how pseudo column works?
Write a program to reverse a number?
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in
hi this is uday i want prepare for nic exam if any one have previous question papers please send me or atlest guide me how to prepare my ID is udaykiran4u@in.com
Which method protects back button to retrieve old value from previous page in Struts.
what is the certificates in biztalk?