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
How do you pass variables forwrd to future CECI sessions
when will triggars the at new event in abap and web dybn pro?
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
How to call dll API sub routine in VB Form.
what is dot net framework
Tag for turning an image into a hyperlink is
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
i am exeprienced person what is selection process
What is the use of Differ interface check box in Ship confirm?
what is the current salary package in India for a lamp programmer
How to know we are in home page of a web application using QTP
What is the purpose of
Delta 5 weight scale not connect with oracle application what i can do?
what is difference between object oriented programming structure and object oriented programming system?
Write a program to show polymorphism.