Write a Pseudo Code to fins the LCM of two given numbers

Answer Posted / shailendra

#include <iostream>
using namespace std;
int main()
{
int x,y,z;
cout<<"Enter First Integer:";
cin>>x;
cout<<"\nEnter Second Integer:";
cin>>y;
z=1;
while(x/z==1 && y/z==1)
{
z=x/y;
cout<<"The LCM of Both Numbers is:"<<z;
}
return 0;
}

Is This Answer Correct ?    8 Yes 69 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

5. How do you round the addition or subtraction of two numbers in assembler?

1980


iam confused among testing ,.net and java. can anybody help me.

1774


what is the meaning of without standing arrears?

10129


what is the use MDM(Master Data Management)and meaning

2145


i am getting the error while compiling my cics program with including db2 dclgen member it is showing that ur dclgen member not including and all the host variables are undeclared

1309


how do i create my own exception class which will restrict IO exception?

2510


we create a pf with 3 fields.2 is defined as keyfields.we lock it with alcobj command.how we find out whether the file is locked or not?is it dspfd??/

1804


Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage

1711


what is the difference between read the data from table and infotype

2289


what is difference between kpo and it industry? that is in terms of work, package etc

1732


What is the difference between DECISION COVERAGE(DC) and MODIFIED CONDITION/DECISION COVERAGE(MCDC)?

2001


Explain what is OOPS and its concepts?

795


Bonjour, svp je veut voir comment envoyer un mail en java et comment changer le droit d'accé d'un fichier en java: de lecture en lecture/écriture et merci d'avance ;)

1924


can we extend a class having only one parameterised constructor.Suggest the process to do it.

2255


Which method protects back button to retrieve old value from previous page in Struts.

1624