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 statement people often delete or read email based upon the subject line alone select one is TRUE. Based on the subject or topic of the email, they will judge if it is worthy to be read or deleted.
Answer:
if the input is zero the out put is 1
Explanation:
because if you think about it if the input was 1 the output would be zero
Answer:
twainQuotes = ['I have never let my schooling interfere with my education.', 'Get your facts first, and then you can distort them as much as you please.', "If you tell the truth, you don't have to remember anything.", 'The secret of getting ahead is getting started.', "Age is an issue of mind over matter. If you don't mind, it doesn't matter. "]
print(twainQuotes)
twainQuotes.sort()
print(twainQuotes)
twainQuotes.insert(1,'Courage is resistance to fear, mastery of fear, not absence of fear.' )
print(twainQuotes)
Explanation:
ok
Answer:
The answer is "2".
Explanation:
In the given question some information is missing, that is "The propagation time for satellite to earth" which is "270 milliseconds" so, the description to this question can be defined as follows:
Given values:
Bandwidth = 64 kbps
Data frames = 512 bytes
Propagation Time (tp ) =270 ms
Change Bandwidth kbps to bps:
1 kb= 1024 bytes
calculated bandwidth= 64 kbps = 64×1024 bps = 65536 bps
1 bytes = 8 bits
512 bytes = 512 × 8 = 4096 bits
Frame length = 4096 bits
Formula
Transmission time (Tt) = Frame length /Bandwidth
Window size = 1+2a
where a = Propagation time/Transmission time
Calculate Transmission time:
Transmission time (Tt) = 4096 / 65536
Transmission time (Tt)= 625 m.sec
Calculate Window size:
Window size = 1+2(270/625)
Window size
= 1+2(0.432)
Window size
= 1+0.864
Window size = 1.864
Window size
= 2