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 delimiter in sas ?
Difference between HTML and DHTML?
can we use commit,rollback in triggers and how?
hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad
What is the difference beween joblib and steplib statements
what is delegate and delegation model give the real live example on delegate model
will it allow to add same value in HashMap class.
any drawback are there in mantis?
When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)
when a query is made on Logical file in DB2/400, will the records satisfying select/omit criterion be fetched from all members of physical file or only the member with same name as physical file?
when will triggars the at new event in abap and web dybn pro?
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?
I want to insert date in the form of yyyy-mm-dd... if any changes happen while inserting date format want to show error meg...any one can solve this..??
1.how to deploy the Maven application in weblogic server? 2.In Real time projects all classes are singleton or some classes only singleton explain? 3.what are the major uses of the designpatterns? 4.explain restful &Soap based services explain?