Closed abhishekb13402 closed 2 years ago
/* Problem Two integers A and B are the inputs. Write a program to find GCD and LCM of A and B.
Input Format The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer A and B.
Output Format Display the GCD and LCM of A and B separated by space respectively. The answer for each test case must be displayed in a new line.
Input 3 120 140 10213 312 10 30
Output 20 840 1 3186456 10 30 */
/* Problem Two integers A and B are the inputs. Write a program to find GCD and LCM of A and B.
Input Format The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer A and B.
Output Format Display the GCD and LCM of A and B separated by space respectively. The answer for each test case must be displayed in a new line.
Input 3 120 140 10213 312 10 30
Output 20 840 1 3186456 10 30 */