hot to do LCM and GCF
<p>I have an homework ask to do LCM and GCF using C++ in the following format:</p>

<p>Input:</p>

<p>The first line of input contains a single integer <strong>N</strong>,(1&lt;=N&lt;=1000) which is the number of data sets that follow. Each data set consists of a single line of input containing two positive integers, <strong>a</strong> and <strong>b</strong>(1&lt;=<strong>a</strong>, <strong>b</strong>&lt;=1000) separated by a space.</p>

<p>output:</p>

<p>for each data set, you should generate on line of output with the following value: The data set number as a decimal integer(start counting at one). the <strong>LCM</strong>, a space, and the*<em>GCF</em>*.</p>

<p>input:</p>

<ul>
<li>3</li>
<li>5 10</li>
<li>7 23</li>
<li>42 56</li>
</ul>

<p>output:</p>

<ul>
<li>1 10 5</li>
<li>2 161 1</li>
<li>3 168 14</li>
</ul>

<p>thank you!</p>
