(Solved) : Challenge Activity 2243 Fixed Range Random Numbers Type Two Statements Use Rand0 Print 2 R Q34283538 . . .
In C Code Language please (NOT C++) thankyou(:
1)
2)
3)
CHALLENGE ACTIVITY 2.24.3: Fixed range of random numbers Type two statements that use rand0 to print 2 random integers between (and including) 100 and 149. End with a newline. Ex: 133 101 Note: For this activity, using one statement may yield different output (due to the compiler calling rand0 in a different order). Use two statements for this activity. Also, srand0 has already been called; do not call srand0 again. 1 #include <stdio.h> 2 #include <stdlib.h> // Enables use of rand() 3 #include <time.h> // Enables use of time() 4 5 int main(void) [ 6 int seedVal; 1 test passed All tests passed 8 scanf(“%d”, &seedVal); 9 srand(seedVal); 10 /* Your solution goes here*/ 11 12 return 0; 14 Run Feedback? How was this section?I CHALLENGE 2.17.2: Tree height. ACTIVITY Simple geometry can compute the height of an object from the object’s shadow length and shadow angle using the formula tangent(angleElevation) treeHeight/ shadowLength. 1. Using simple algebra, rearrange that equation to solve for treeHeight. (Note: Don’t forget tangent) 2. Complete the below code to compute treeHeight. For tangent, use the tan0 function, described in the ‘math functions” link above Notes) 1 #include <stdio.h> 2 #include <math.h> 4 int main(void) [ 6 double shadowLength; 1 test passed double treeHeight; All tests passed 7 double angleElevation; 9 scanf(“%Lf”, &angleElevation); 10 scanfC”%Lf”, &shadowLength); 12 /*Your solution goes here 13 14 15 16 17 printf(“%lfn”, treeHeight) ; return 0; 2 Run Feedback? CHALLENGE 2.17.1: Coordinate geometry ACTIVITY Determine the distance between point (x1, y1) and point (x2, y2), and assign the result to pointsDistance. The calculation is: Distance (x2 -a1)2 + (y2 -yl) Ex:For points (1.0, 2.0) and (1.0, 5.0), pointsDistance is 3.0 1 test passed 12 13 xDist -0.0; 14 yDist 15 point 16 17 scanf(“%lf”,8×1); 18 scanf(“%lf”,&y1); 19 ScanfC”lf”, &x2); 20 scanf(“%If”,&y2); 21 22*Your solution goes here*/ 23 24 printf(“%lfn”, pointsDistance); 25 26 27 0.0; sDistance0.0; All tests passed return0; Run Show transcribed image text
Expert Answer
Answer to Challenge Activity 2243 Fixed Range Random Numbers Type Two Statements Use Rand0 Print 2 R Q34283538 . . .
OR