Answer:
Follows are the code to this question:
#include <stdio.h>// header file
int main()//main method
{
int i,x, y;//declaring integer variable
float result;//declaring flat variable
for(i=0; i<16; i++) //defining foe loop for calculate value
{
x = (rand() % (50 - 0 + 1)) + 1;//use x variable for hold random value
y = (rand() % (50 - 0 + 1)) + 1;//use x variable for hold random value
result=(float)x/y;//use result variable for calculate value
printf("%.4f\\",result);//print value
}
return 0;
}
Output:
0.2200
0.2857
0.8684
0.7755
2.3000
0.1875
1.0500
1.3043
1.4839
1.2812
4.0000
0.9250
2.5000
1.8000
1.1034
1.1250
Step-by-step explanation:
In the given code, three integer variable "i,x, and y" one float variable "result" is defined, in which integer variable "x and y" is used in the for loop, that uses the random function input value and in the float variable "result" it divides the value from x to y. This variable uses the typecasting to convert an integer to float and print its value.