# include < stdio.h> # include < conio.h> void main () {
clrscr();
int x,y,c,k;
printf("vvedite x \n");
scanf("%d",& x);
printf("vvedite y \n");
scanf("%d",& y);
printf("vvedite c \n");
scanf("%d",& c);
k=x+(y/(2*c));
printf("otvet: %d \n",k);
getch();
}
Ответ дал: Гость
program rrr; uses crt; const n=9; type massiv=array[1..n]of real; var a: massiv; max,sr: integer; procedure vvod(var x: massiv); var i: integer; beginwriteln('wwedite massiv'); for i: =1 to n doreadln(x[i]); end; procedure vivod(x: massiv); var i: integer; beginfor i: =1 to n dowrite(x[i]: 6: 2,' '); end; procedure sred_ar_i_max(x: massiv,var sr,max: real); var sum: real; i: integer; begins: =0; for i: =1 to n doif x[i]> 0 then s: =s+x[i]; end; sr: =s/n; for i: =1 to n doif (x[i]> 0) and max< x[i] then max: =x[i]; end; vvod(a); clrscr; vivod(a); sred_ar_i_max(a,sr,max); writeln('max=',max: 6: 2,'srednee arifmet=',sr: 6: 2); readln; end.
Популярные вопросы