На C++ #include
using std::cout;
using std::cin;
using std::endl;
#include
using std::rand;
using std::srand;
#include
using std::time;
{
srand(time(0));
int counter = 0;
int growth; for(int i = 0; i < 50; i++)
{
if((growth = rand() % 151 + 150) >= 170)
{
counter++;
}
cout << growth << ;
}
cout << endl << endl; cout << counter << " pupil";
cout << (counter != 1 ? "s" : "") << endl; // Если будет только 1 ученик,
//то больше ничего не печатать
//иначе - допечатать букву "s" cin.get();
return 0;
Если ответ по предмету Информатика отсутствует или он оказался неправильным, то попробуй воспользоваться поиском других ответов во всей базе сайта.