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:
Answer:
recognition
Explanation:
<h2><u>Fill in the blanks</u></h2>
When you take a multiple-choice test, you are relying on <u>recognition</u> , a means of retrieving information out of your long-term memory storage system that helps you choose the correct answer.
Answer:
B,C,E your welcome
Explanation: i just took the test
Answer:
The definition including its context of this discussion is outlined in the following clarification portion.
Explanation:
- An array seems to be a storage research method to collect a set number of constant weight. Whenever the array was indeed generated, the length including its array has been determined. Its period is set after development.
- Depending mostly on array description, the array may contain data structures and even some objects in something like a class. For primitive data types, the individual values become located at contiguous locations throughout the store.
Scenario:
- If we're to preserve a summary, we could use the appropriate array size.
- An individual can however preserve an object list.