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 three modes in which files can be accessed from python program
Explain with examples any 2 features of OOPS.
Is class is a abstract datatype in java?
i want to insert textbox value to sql db. i have only one text box but store four values. ple give any one give sample code in asp.net c#..
10.Define filters,binary to hexadecimal,hexadecimal to decimal?
What sysoption determines where the macro facility searches a specific catalog for complied macro?
5. How do you round the addition or subtraction of two numbers in assembler?
What is Negative testing?
what is the difference between SCAN AND CHECK,LOKUP AND XFOOT? where we can use thease opcodes? Can any body tell me real time senariao with example?
You are given some denominations of coins in an array (int denom[])and infinite supply of all of them. Given an amount (int amount), find the minimum number of coins required to get the exact amount. What is the method called?
Can any one give an example (Source Code) on virtual function implemetation in Java?
How does the TCP handle the issue of multiplexing?
Diff between IF and where ?
can any one suggestion me present which course(except java,.net) has huge demand in the market?
Hi can you please send me recent(present) interview questions and technical qyestions with answers for "BUSSIESS OBJECTS" and "DATA WAREHOUSE".pls its urgent for me my mail id is sekhar.cs82@gmail.com,manjuforgis@gmail.com. thanks in advance