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

how do we provide security for web services

1811


Write a function which accepts a sentence as input parameter.Each word in that sentence is to be reversed. Space should be there between each words.Return the sentence with reversed words to main function and produce the required output. for eg:- i/p: jack jill jung kill o/p: kcaj llij gnuj llik

1759


what are other resources are needed for this mantis?

1520


What are the tasks performed by a Team Lead

2337


What is the difference between COM and CORBA?

730






kindly send interview materials

1315


< DL Compact > tag is used for

1547


What is dialog programming?

1580


what is the extension of SPDS Dynamic cluster tables?

1623


I'm new to ABAP. What is Module pool in SAP?

2123


1. Write a program to create a sentence at runtime and count number of vowels in it ? 2. Write a program to get a string and to convert the 1st letter of it to uppercase ?

3214


1) How can u create the table?

1375


what is difference between input parameter and output parameter.

4213


how to convert infix expression to prefix expression?

3829


diffrence between oracle apps , .NET , SAP

1603