Advertisement
Momav

Untitled

Feb 19th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int num = 0;
  7.     int min = 0;
  8.     int max = 0;
  9.     cout << "min" << endl;
  10.     cin >> min;
  11.     cout << "max" << endl;
  12.     cin >> max;
  13.     while (min <= max)
  14.     {
  15.         if (min % 2 == 0)
  16.         {
  17.             num += min;
  18.         }
  19.         cout << "num: " << num << endl;
  20.     }
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement