Advertisement
SohagAbdullah

problem D

Feb 28th, 2021
1,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main()
  5. {
  6.     int count = 0,i;
  7.     long long int number;
  8.     double srt[32001];
  9.  
  10.     while(1)
  11.     {
  12.         if(scanf("%lld",&number)!=EOF)
  13.         {
  14.             srt[count] = (double)sqrt(number);
  15.             //printf("%lf\n",srt[count]);
  16.             count++;
  17.             continue;
  18.         }
  19.  
  20.         for(i=(count-1); i>=0; i--)
  21.         {
  22.             printf("%.4lf\n",srt[i]);
  23.             if(i==0)
  24.                 return 0;
  25.         }
  26.     }
  27. }
  28.  
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement