Advertisement
CLazStudio

q198453237

Feb 22nd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <math.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int a, b, c;
  10.     cin >> a >> b >> c;
  11.  
  12.     for (int i = a; i <= b; i += c)
  13.     {
  14.         cout << setw(8) << i;
  15.         cout << setprecision(8) << setw(16) << sqrt(i*i + 4) << endl;
  16.     }
  17.  
  18.     return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement