Advertisement
j33vansh

Answer 1 Looping CPP

Jun 26th, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define FIO                           \
  4.     ios_base::sync_with_stdio(false); \
  5.     cin.tie(NULL);                    \
  6.     cout.tie(NULL);
  7.  
  8. int main()
  9. {
  10.     FIO;
  11.     int n;
  12.     cin >> n;
  13.     int output = 0;
  14.     while (output * output <= n)
  15.      {
  16.         output += 1;
  17.      }
  18.     output -= 1;
  19.     cout << output << endl;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement