Answer:
#include<iostream>
using namespace std;
int lcm(int m, int n) {
int a;
a = (m > n) ? m: n;
while (true) {
if (a % m == 0 && a % n == 0)
return a;
++a;
}
}
int gcd(int m, int n) {
int r = 0, a, b;
a = (m > n) ? m : n;
b = (m < n) ? m : n;
r = b;
while (a % b != 0) {
r = a % b;
a = b;
b = r;
}
return r;
}
int main(int argc, char **argv) {
cout << "Enter the two numbers: ";
int m, n;
cin >> m >> n;
cout << "The LCM of two numbers is: " << lcm(m, n) << endl;
cout << "The GCD of two numbers is: " << gcd(m, n) << endl;
return 0;
}
Explanation:
The "transport" layer of the OSI model performs a series of miscellaneous functions
Machine function also called miscellaneous functions—influence. positive functions on the machine, such as diverting the spindle rotation and coolant on and off, the path action of the tool, and the program beheading.
```
#!/usr/local/bin/python3
import sys
coins = { "quarters" : 25, "dimes" : 10, "nickels" : 5, "pennies" : 1 }
def mkChange( balance, coin ):
qty = balance // coins[ coin ]
if( qty ):
print( str( qty ) + ' ' + coin )
return( balance % coins[ coin ] )
if( __name__ == "__main__" ):
if( len( sys.argv ) == 2 ):
balance = int( sys.argv[ 1 ] )
balance = mkChange( balance, "quarters" )
balance = mkChange( balance, "dimes" )
balance = mkChange( balance, "nickels" )
balance = mkChange( balance, "pennies" )
else:
sys.stderr.write( "\nusage: " + sys.argv[ 0 ] + " <change owed>\n" )
```