Quick actions

cmd+k|ctrl+k

Navigation

Languages

188

Snippet info

Language

Cpp

Visibility

public

Author

maloy-

Created

2018-10-31T19:13:34Z

Updated

2018-10-31T19:13:34Z

#include <iostream>
using namespace std;

int main() {
	setlocale(LC_ALL, "RU");
	double a;
	cout << "Введите a ( 1 < a <= 1.5)" << endl;
	cin >> a;
	double n = 2;

	do {

		if ((1 + (1 / n)) < a) {
			cout <<"Наименьшее n = " << n << endl;
			break;
		}
		else {
			n = n + 1;
			
		}

	} while (true);



	return 0;
}
INFO