STANAANDREY

bacT11 SIII 1

May 25th, 2021 (edited)
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. void patrate(int x, int y) {
  6.     long long sum = 0;
  7.     for (int i = x; i <= y; i++) {
  8.         if (sqrt(i) == 1.f * (int)sqrt(i)) {
  9.             cout << i << '+';
  10.             sum += i;
  11.         }
  12.     }
  13.     cout << "\b=" << sum << endl;
  14. }
  15.  
  16. int main() {
  17.     //CALL HERE
  18.     return 0;
  19. }
  20.  
Add Comment
Please, Sign In to add comment