Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- ///////////////////////////////////////////////////////
- int main() //
- {
- setlocale(LC_ALL, "Rus");
- int i, mk7 = 0, max = 0, mpr = 0, x, res, n = 0;
- do{
- cin >> x;
- if((x%7 == 0)&&(x%49 != 0) &&(x > mk7)) mk7 = x;
- if((x > max)&&(x% 7 != 0)) max = x;
- n++;
- } while(x != 0);
- cin >> res;
- mpr = mk7 * max;
- if(mpr == 0) mpr = 1;
- cout << "Введено чисел: " << n-1 << endl;
- cout << "Контрольное значение " << res << endl;
- cout << "Вычисленное значение " << mpr << endl;
- cout << "Значения "; if(res != mpr) cout << "не ";
- cout << "совпали" ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement