Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdio.h>
- int main()
- {
- int flower_radius, flower_x, flower_y, circle_x, circle_y, circle_radius;
- circle_radius = 3;
- circle_x = 0;
- circle_y = 0;
- flower_radius = 4;
- flower_x = 0;
- flower_y = 0;
- double distance = sqrt( pow(circle_x - flower_x, 2) + pow(circle_y - flower_y, 2) );
- if ( circle_radius >= (distance + flower_radius) ){
- printf("Vivo\n");
- }else{
- printf("Morto\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment