Answer:
The typedef struct is as follows:
typedef struct jumper_t {
char name[16];
double tries[N_TRIES];
double best_jump;
double deviation;
} jumper_t;
The declaration of jlist is:
jumper_t jlist[10];
Explanation:
This defines the typedef structure
typedef struct jumper_t {
The following declares the variables as stated in the question
<em> char name[16];
</em>
<em> double tries[N_TRIES];
</em>
<em> double best_jump;
</em>
<em> double deviation;
</em>
}
This ends the typedef definition
jumper_t;
(b) The declaration of array jlist is:
jumper_t jlist[10];
Answer:
64 K bytes = 65536 bytes
32 M bytes = 33554432 bytes
Explanation:
The question expect the number of bytes in binary instead of decimal. So this is important to understand that:
- 1K bytes = 1024 bytes (in binary)
Therefore,
- 64 Kb = 64 x 1024 = 65536 bytes
Using the similar calculation logic, we know
- 1M bytes = 1024 x 1024 = 1048576 bytes (in binary)
Therefore,
- 32 M bytes = 32 x 1048576 = 33554432 bytes
import math
num1 = int(input("Enter a number: "))
num2 = int(input("Enter a number: "))
print(math.gcd(num1, num2))
The gcd() - greatest common divisor function, which is part of the math module works perfectly in this situation.