Считайте рост претендента в команду случайным числом из диапазона от 150 до 200 см,а число претендентов n=50. сделать программу на языке Паскаля
Ребят,срочно.оценка за четверть решается
                        
                            
                            
                    Ответы
                                            Ответ дал: 
                                                                                    
                                        
                                            
                                                
                                                
                                                
                                                    0
                                                
                                            
                                        
                                    
                                        На C++ #include <iostream>
using std::cout;
using std::cin;
using std::endl;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;int main()
{
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;
                                        
                                        
                                using std::cout;
using std::cin;
using std::endl;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;int main()
{
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;
                                            Ответ дал: 
                                                                                    
                                        
                                            
                                                
                                                
                                                
                                                    0
                                                
                                            
                                        
                                    
                                        ну или так ar
a array 150..200 of Integer;
i,n,t:Integer;
begin
t:=0;
n:=50;
for i:=1 to n do
begin
if a[i]>170 then
t:=t+1;
end;
end.ar
a array 150..200 of Integer;
i,n,t:Integer;
begin
t:=0;
n:=50;
for i:=1 to n do
begin
if a[i]>170 then
t:=t+1;
end;
end.
                                        
                                        
                                a array 150..200 of Integer;
i,n,t:Integer;
begin
t:=0;
n:=50;
for i:=1 to n do
begin
if a[i]>170 then
t:=t+1;
end;
end.ar
a array 150..200 of Integer;
i,n,t:Integer;
begin
t:=0;
n:=50;
for i:=1 to n do
begin
if a[i]>170 then
t:=t+1;
end;
end.
Вас заинтересует
                
                        2 года назад
                    
                
                        8 лет назад
                    
                
                        10 лет назад
                    
                
                        10 лет назад
                    
                
                        10 лет назад