Elabore um programa que leia um vetorA e um VetorB de 20 elementos do tipo real, construa um VetorC de mesma dimensão com o resultado da média do VetorA com o VetorB.
Program ex_hightech ; usescrt; type vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real; var A:vetorA; B:vetorB; C:vetorC; I:integer; Begin usescrt for I:=1 to 20 do begin gotoxy(10,5); writeln('Vetor A'); gotoxy(10,5+I); readln(A[I]); gotoxy(30,5); writeln('Vetor B'); gotoxy(30,5+I); readln(B[I]); C[I]:= (A[I] + B[I])/2; gotoxy(50,5); writeln('Vetor C'); gotoxy(50,5+I); writeln(C[I]:2:2); end;
program elementos; uses crt; type vetorA=array[1..20] of real; vetorB=array[1..20] of real; vetorC=array[1..20]of real; var I:INTEGER; A:vetorA; B:vetorB; C:vetorC; media:real; Begin textbackground(1); textcolor(0); clrscr; For I:=1 to 20 do begin writeln('escreva o valor a[i]'); readln(a[i]); writeln('escreva o valor b[i]'); readln(b[i]); end; For I:=1 to 20 do begin c[i]:=a[i]+b[i]; end; media:=c[i]/20; writeln('a media é',c[i]:2:2); readln; readln; end.
program elementos; uses crt; type vetorA=array[1..20] of real; vetorB=array[1..20] of real; vetorC=array[1..20]of real; var I:INTEGER; A:vetorA; B:vetorB; C:vetorC; media:real; Begin textbackground(0); textcolor(6); clrscr; For I:=1 to 20 do begin writeln('digite o valor a[i]'); readln(a[i]); writeln('digite o valor b[i]'); readln(b[i]); end; For I:=1 to 20 do begin c[i]:=a[i]+b[i]; end; media:=c[i]/20; writeln('a media é',c[i]:2:2); readln; readln; end.
type vetorA = array [1..20] of real; vetorB = array [1..20] of real; vetorC = array [1..20] of real; var A:vetorA; B:vetorB; C:vetorC; I:integer; Begin
for I:= 1 to 20 do begin readln(A[I]); readln(B[I]); end; for I:= 1 to 20 do begin C[I]:= (A[I] + B[I])/ I; writeln(C[I]); end;
Bianca Nunes Program vetor; Type vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real;
Var I:integer; A: A; B:B; C:C; Begin For I :=1 to 20 do Begin writeln('Digite vetor A'); Readln(A[I]); End; For I:= 1 to 20 do Begin Writeln('Digite vetor B'); Readln(B[I]); End; For I:= 1 to 20 do Begin C[I] :=(A[I] +B[I]) /2; Writeln('A media e', C [I]:2:2); End; Readln; End.
Daniella Program vetor; Type vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real;
Var I:integer; A: A; B:B; C:C; Begin For I :=1 to 20 do Begin writeln('Digite vetor A'); Readln(A[I]); End; For I:= 1 to 20 do Begin Writeln('Digite vetor B'); Readln(B[I]); End; For I:= 1 to 20 do Begin C[I] :=(A[I] +B[I]) /2; Writeln('A media e', C [I]:2:2); End; Readln; End.
Isadora Program vetor; Type vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real;
Var I:integer; A: A; B:B; C:C; Begin For I :=1 to 20 do Begin writeln('Digite vetor A'); Readln(A[I]); End; For I:= 1 to 20 do Begin Writeln('Digite vetor B'); Readln(B[I]); End; For I:= 1 to 20 do Begin C[I] :=(A[I] +B[I]) /2; Writeln('A media e', C [I]:2:2); End; Readln; End.
vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real;
var
A:vetorA; B:vetorB; C:vetorC; I:integer;
Begin for I:=1 to 20 do begin writeln('Digite Vetor A'); readln(A[I]); writeln('Digite Vetor B'); readln(B[I]); C[I]:= (A[I] + B[I])/2; writeln('Vetor C'); writeln(C[I]:2:2); end;
Program ExercicioHitech; Uses crt; Type vetorA=array [1..20] of real; vetorB=array [1..20] of real; vetorC=array [1..20] of real;
var A:vetorA; B:vetorB; C:vetorC; I:integer;
Begin textcolor(5); Textbackground(1); for I:=1 to 20 do begin writeln('Digite Vetor A'); readln(A[I]); writeln('Digite Vetor B'); readln(B[I]); C[I]:= (A[I] + B[I])/2; writeln('A media e', C[I]:2:2); end; End.
Oi Grupo highTech, vcs conferiram a resposta deste comentário? http://grupohightech.blogspot.com/2009/03/desafio-2.html?showComment=1237167960000#c4953978545483593262
Este comentário foi removido pelo autor.
ResponderExcluirEste comentário foi removido pelo autor.
ResponderExcluirProgram ex_hightech ;
ResponderExcluirusescrt;
type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
var
A:vetorA;
B:vetorB;
C:vetorC;
I:integer;
Begin
usescrt
for I:=1 to 20 do
begin
gotoxy(10,5);
writeln('Vetor A');
gotoxy(10,5+I);
readln(A[I]);
gotoxy(30,5);
writeln('Vetor B');
gotoxy(30,5+I);
readln(B[I]);
C[I]:= (A[I] + B[I])/2;
gotoxy(50,5);
writeln('Vetor C');
gotoxy(50,5+I);
writeln(C[I]:2:2);
end;
End.
Gilberson do Valle
ResponderExcluirprogram elementos;
uses crt;
type
vetorA=array[1..20] of real;
vetorB=array[1..20] of real;
vetorC=array[1..20]of real;
var
I:INTEGER;
A:vetorA;
B:vetorB;
C:vetorC;
media:real;
Begin
textbackground(1);
textcolor(0);
clrscr;
For I:=1 to 20 do
begin
writeln('escreva o valor a[i]');
readln(a[i]);
writeln('escreva o valor b[i]');
readln(b[i]);
end;
For I:=1 to 20 do
begin
c[i]:=a[i]+b[i];
end;
media:=c[i]/20;
writeln('a media é',c[i]:2:2);
readln;
readln;
end.
Sinara do Valle
ResponderExcluirprogram elementos;
uses crt;
type
vetorA=array[1..20] of real;
vetorB=array[1..20] of real;
vetorC=array[1..20]of real;
var
I:INTEGER;
A:vetorA;
B:vetorB;
C:vetorC;
media:real;
Begin
textbackground(0);
textcolor(6);
clrscr;
For I:=1 to 20 do
begin
writeln('digite o valor a[i]');
readln(a[i]);
writeln('digite o valor b[i]');
readln(b[i]);
end;
For I:=1 to 20 do
begin
c[i]:=a[i]+b[i];
end;
media:=c[i]/20;
writeln('a media é',c[i]:2:2);
readln;
readln;
end.
Taffarel Ribeiro.
ResponderExcluirProgram media_ex1 ;
type
vetorA = array [1..20] of real;
vetorB = array [1..20] of real;
vetorC = array [1..20] of real;
var
A:vetorA;
B:vetorB;
C:vetorC;
I:integer;
Begin
for I:= 1 to 20 do
begin
readln(A[I]);
readln(B[I]);
end;
for I:= 1 to 20 do
begin
C[I]:= (A[I] + B[I])/ I;
writeln(C[I]);
end;
End.
Bianca Nunes
ResponderExcluirProgram vetor;
Type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
Var
I:integer;
A: A;
B:B;
C:C;
Begin
For I :=1 to 20 do
Begin
writeln('Digite vetor A');
Readln(A[I]);
End;
For I:= 1 to 20 do
Begin
Writeln('Digite vetor B');
Readln(B[I]);
End;
For I:= 1 to 20 do
Begin
C[I] :=(A[I] +B[I]) /2;
Writeln('A media e', C [I]:2:2);
End;
Readln;
End.
Daniella
ResponderExcluirProgram vetor;
Type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
Var
I:integer;
A: A;
B:B;
C:C;
Begin
For I :=1 to 20 do
Begin
writeln('Digite vetor A');
Readln(A[I]);
End;
For I:= 1 to 20 do
Begin
Writeln('Digite vetor B');
Readln(B[I]);
End;
For I:= 1 to 20 do
Begin
C[I] :=(A[I] +B[I]) /2;
Writeln('A media e', C [I]:2:2);
End;
Readln;
End.
Isadora
ResponderExcluirProgram vetor;
Type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
Var
I:integer;
A: A;
B:B;
C:C;
Begin
For I :=1 to 20 do
Begin
writeln('Digite vetor A');
Readln(A[I]);
End;
For I:= 1 to 20 do
Begin
Writeln('Digite vetor B');
Readln(B[I]);
End;
For I:= 1 to 20 do
Begin
C[I] :=(A[I] +B[I]) /2;
Writeln('A media e', C [I]:2:2);
End;
Readln;
End.
:Gabriel:
ResponderExcluirProgram V3;
Uses crt;
Type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
var
A:vetorA;
B:vetorB;
C:vetorC;
I:integer;
Begin
for I:=1 to 20 do
begin
writeln('Digite Vetor A');
readln(A[I]);
writeln('Digite Vetor B');
readln(B[I]);
C[I]:= (A[I] + B[I])/2;
writeln('Vetor C');
writeln(C[I]:2:2);
end;
End.
Beleza, agora já conseguimos adicionar comentários!!!!
ResponderExcluirEste comentário foi removido pelo autor.
ResponderExcluirMateus Dalcol
ResponderExcluirProgram ExercicioHitech;
Uses crt;
Type
vetorA=array [1..20] of real;
vetorB=array [1..20] of real;
vetorC=array [1..20] of real;
var
A:vetorA;
B:vetorB;
C:vetorC;
I:integer;
Begin
textcolor(5);
Textbackground(1);
for I:=1 to 20 do
begin
writeln('Digite Vetor A');
readln(A[I]);
writeln('Digite Vetor B');
readln(B[I]);
C[I]:= (A[I] + B[I])/2;
writeln('A media e', C[I]:2:2);
end;
End.
Renato
ResponderExcluirProgram diadyu;
uses crt;
type
vetorA=array[1..20]of real;
vetorB=array[1..20]of real;
vetorC=array[1..20]of real;
var
A:vetorA;
B:vetorB;
c:vetorC;
I:integer;
begin
textbackground(8);
textcolor(3);
clrscr;
forI:= 1 to 20 do
begin
gotoxy(10,4+I);
readln(A[I]);
gotoxy(20,4+I);
readln(B[I]);
C[I]:=(A[I])+(B[I])/2
gotoxy(30,4+I);
writeln(C[I]:2:2);
end;
readln;
end.
Isso ai galera as respostas estão todas certas,parabénsssssssssss
ResponderExcluirGrupo High tech
Oi Grupo highTech, vcs conferiram a resposta deste comentário?
ResponderExcluirhttp://grupohightech.blogspot.com/2009/03/desafio-2.html?showComment=1237167960000#c4953978545483593262
http://grupohightech.blogspot.com/2009/03/desafio-2.html?showComment=1237167960000#c4953978545483593262
ResponderExcluirEste comentário é apenas um este no blog de vcs.
ResponderExcluirDesculpem o transtorno