Question: Data structure ( C++ ). I want to ask If my answer for this question is correct or not ? 3. Write a program that
Data structure ( C++ ). I want to ask If my answer for this question is correct or not ?
3. Write a program that finds the smallest common multiples of two given numbers using Euclids improved algorithm; (6 points) #include using namespace std; int a, b, c, d, usg, usj; int main () { cin>>a>>b; c=a; d=b; while(a!=0 && b!=0) if (a>b) a=a%b; else b=b%a; usg=a+b; usj=c*d/usg; cout<
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
