(a) In the main program scan four integers a,b,c,d. Call theCode:main()
{
int a, b, c, d;
double max, min, m, M, x, y;
printf("Enter four integers: ");
scanf("%d %d %d %d", &a, &b, &c, &d);
printf("%d %d %d %d", a, b, c, d);
printf("\n");
max = M;
min = m;
do
{
if(M > max) max = M;
if(m < min) min = m;
printf("%d \t %d\n", max, min);
}while(m>0);
printf("\n\nMaximum of a,b,c,d is: M=%d", max);
printf("\n\nMinimum of a,b,c,d is: m=%d\n\n", min);
}
functions maximum(a,b,c,d) and minimum(a,b,c,d) to find the
maximum (M) and minimum (m) values among a,b,c,d.
(b) Call the function mult(M,m) which returns the power M^m,
evaluated by multiplying M by itself m times. Impose that M^0=1 for all M. If M=0 and m<0, print that 0^m = infinity.
(Do not evaluate M^m by using pow() function, or by using the for loop).
I definately have part (a) down, but part (b) is the confusing little guy. The DO command won't read the numbers because I don't know what to put before the.Someone help please! :(Code:y_max = M