[SOLVED] C algorithm Lab Work #9

$25

File Name: C_algorithm_Lab_Work_#9.zip
File Size: 216.66 KB

5/5 - (1 vote)

Lab Work #9

:
:

1.[code ] N(<=100) , N X, Y Poly[] . . (, Heap Sort , X,Y 100 .)1. [] N<= 100 NXY Poly[] Heap Sort X,Y100.struct point { char c; int x, y; };struct line { struct point p1, p2; };struct point polygon[Nmax]; float ComputeAngle(struct point p1, struct point p2){ int dx, dy, ax, ay; float t; dx = p2.x – p1.x; ax = abs(dx); dy = p2.y – p1.y; ay = abs(dy); t = (ax+ay == 0) ? 0 : (float) dy/(ax+ay); if (dx < 0) t = 2-t; else if (dy < 0) t = 4+t; return t*90.0;}[ ] []7 (N ) (N )A 3 4 ( A ) ( A)B 1 2( B ) ( B)C 2 5( C ) ( C)D 2 6( D ) ( D)E 9 3( E ) ( E)F 5 3( F ) ( F)G 6 4( G ) ( G)H 8 7 ( H ) ( H)[ ] []15 ( ) ()60 ( ) ()( )2. [code ] Z N , Poly[] . , .2. [] Z NPoly[] [ ] []8 3 5 (N , Z x , Z y ) (N, Zx, Zy)A 3 4 ( A ) ( A)B 1 2( B ) ( B)C 2 5( C ) ( C)D 2 6( D ) ( D)E 9 3( E ) ( E)F 5 3( F ) ( F)G 6 4( G ) ( G)H 8 7 ( H ) ( H)[ ] []False ( ) [] 2 ( ) eclass .2019 SpringComputer Algorithm (01)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] C algorithm Lab Work #9
$25