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
any drawback are there in mantis?
what is the current salary package in India for a lamp programmer
How to get the index of the clicked field in reports in ABAP?
in a VB application, where the data will be stored after manipulation? what is the syntax for that?
how CLR identify vb file?
what is radio button? Plz show code this! how will select radio buttons to go next window Forms? Supose o radio button1 o radio button2 o radio button3 o radio button4 how will coding this? Plz explain this!
what is the use MDM(Master Data Management)and meaning
Find out the roles which gives access to all tables in SAP? Thanks in advance.
can we retrieve only integer/String type columns from a table,if yes how?
what is the BAM? where we can use it in BizTalk server?
Hi All, Can any one please send me the difference between informatica 7i and 8i versions, Thanks in advance. vinod
1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?
what is the diffrence between software and hardware language?
what will we require to build project with the help of oracle
can any one suggestion me present which course(except java,.net) has huge demand in the market?