Example: main ()
w
begin
w
write(‘How many pairs?’);
w
readln(noPairs);
w
for i := 1 to noPairs do
w
begin
w
write(‘Enter first letter of’,
w
‘choice (Gcd, Lcm, Both) ‘,
w
‘then two numbers: ‘);
w
readln(choice, oneA,
oneB);
w
doIt(choice, oneA, oneB)
w
end
w
end.
main()
{
}
cout << “How many pairs?”
cin >> noPairs;
while (cin.get() != ‘\n’);
for (i=1; i<=noPairs; i++)
{
}
cout<<“Enter first letter of”
<<“choice (Gcd,Lcm,Both”
<<“then two numbers: “;
cin>>choice>>oneA>>oneB;
while (cin.get() != ‘\n’);
doIt(choice, oneA, oneB);