Составить список сотрудников, предприятия, уходящих в 2014 году на пенсию, определить процент лиц мужского и женского пола. исходными данными является список сотрудников из 10 человек с указанием их пола, года рождения.
A: array[1..10] of integer; b, d: array[1..10] of string; c: array[1..10] of string; m, n, i, k, t : integer; begin for i: =1 to 10 do readln(a[i]); readln(b[i]); readln(c[i]); t: =1; for i: =1 to 10 do if (2014-a[i])> 65 then begin d[t]: =b[i]; t: =t+1; end; for i: =1 to 10 do if c[i]='м' then m: =m+1 else n: =n+1; m: =m\10*100; n: =n\10*100; for i: =1 to t do writeln(d[i]); writeln(n); writeln(m); readln; end.
tatyanakras911248
16.09.2021
1) #include < iostream> #include < math.h> using namespace std; double circle_perimtr(int r) { return 2*m_pi*r; } int main() { int r; cin > > r; r > 0 ? cout < < circle_perimtr(r) < < endl : cout < < "wrong" < < endl; } 2) #include < iostream> #include < limits.h> using namespace std; double max_height(int* heights) { int max = int_min; for(int i = 0; i < 6; i++) if(heights[i] > max) max = heights[i]; return max; } int main() { int heights[6]; for(int i = 0; i < 6; i++) cin > > heights[i]; cout < < max_height(heights) < < endl; }
lazu8375
16.09.2021
1) #include < iostream> #include < math.h> using namespace std; double circle_perimtr(int r) { return 2*m_pi*r; } int main() { int r; cin > > r; r > 0 ? cout < < circle_perimtr(r) < < endl : cout < < "wrong" < < endl; } 2) #include < iostream> #include < limits.h> using namespace std; double max_height(int* heights) { int max = int_min; for(int i = 0; i < 6; i++) if(heights[i] > max) max = heights[i]; return max; } int main() { int heights[6]; for(int i = 0; i < 6; i++) cin > > heights[i]; cout < < max_height(heights) < < endl; }