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
Explain what is OOPS and its concepts?
how to check single or double byte in struts
I have try to write a record in a TDQ from a fle.... what are the steps to do... can anybody plz come with a solution
Explain polymorphism. Provide an example.
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.
what is adodb??y it is used for connection of V.B and access??what is ado?dao?
what is woransient key word? how it is used in java
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
what is the difference between an OS(operating system) and Framework?
what are the differences between CONS, LIST, and APPEND
Give examples of macro quoting function?
10.Define filters,binary to hexadecimal,hexadecimal to decimal?
what is integration testing in real time applications?
Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number
What is BASIS