Advertisement
MonsterScripter

CodinGame_2023_08_21__22_07_45__pythagore.c

Aug 21st, 2023 (edited)
693
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <stdbool.h>
  5. #include <math.h>
  6.  
  7. /**
  8.  * Auto-generated code below aims at helping you parse
  9.  * the standard input according to the problem statement.
  10.  **/
  11.  
  12. int main()
  13. {
  14.     float a;
  15.     scanf("%f", &a);
  16.     float b;
  17.     scanf("%f", &b);
  18.  
  19.     // Write an answer using printf(). DON'T FORGET THE TRAILING \n
  20.     // To debug: fprintf(stderr, "Debug messages...\n");
  21.  
  22.     printf("%.2f\n", sqrt((a*a)+(b*b)));
  23.  
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement