Question: 1. Write a program that computes XAY (X to the power of Y), X is double type and Y should be an integer. You are
1. Write a program that computes XAY (X to the power of Y), X is double type and Y should be an integer. You are required to use a for loop to solve the problem. Do not use the pow function from the "math.h" library. Hint: 544 -5*5*5*5. 2. Write a program that requests two positive integer numbers X, and Y from user. Each number should be greater than 1. Calculate the greatest common divisor (ged) of these two numbers. Note that a greatest common divisor is the largest positive number that divides both X and Y. For example, gcd(3,5)-1; gcd( 12, 16)=4; Hint, a simple solution is to check from 1 all the way to min(X, Y) to see if it could divide X and Y. 3. Request a number N from the user, with the constraints N>-2 and N
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
