TrabalhosGratuitos.com - Trabalhos, Monografias, Artigos, Exames, Resumos de livros, Dissertações
Pesquisar

Fundamentos Da Computação I

Tese: Fundamentos Da Computação I. Pesquise 860.000+ trabalhos acadêmicos

Por:   •  28/10/2014  •  Tese  •  781 Palavras (4 Páginas)  •  185 Visualizações

Página 1 de 4

Nome: Ana Maria Tomaz Takayanagi do NascimentoTicket de confirmação ID-T-796209

RA: 06155997

Curso: Engenharia Civil

Program exercicio1;

Var ni: integer;

begin

write ('escreva o número: ');

read (ni);

if (ni >=1) and (ni <=10) then

begin

writeln ('o número está no intervalo de 1 a 10');

end

else

writeln ('não está no intervalo de 1 a 10');

end.

Program exercicio2;

Var salario, salariototal, grat: real;

Tempo: integer;

begin

write ('tempo de serviço: ');

read (tempo);

write ('salário: ');

read (salario);

if (tempo>=1) and (tempo<10) then

begin

grat :=( salario*0.1);

end

else

begin

if (tempo>=10) then

grat :=( salario*0.25);

end;

salariototal :=( salario+grat);

writeln ('salario total é: ‘, salario+grat :0:2);

end;

Program exercicio3 ;

Var i: integer;

begin

write('informe a idade: ');

read( i);

if(i>=0) and(i<=3)then

begin

write('bebê');

end

else

begin

if(i>=4) and(i<=10) then

begin

write('criança');

end

else

begin

if(i>=11) and(i<=18)then

begin

write('adolescente');

end

else

begin

if(i>18) then

write('adulto');

end;

end;

end;

end;

Program exercicio4;

var l1, l2, l3: real;

Begin

write('digite o valor do primeiro lado: ');

readln(l1);

write('digite o valor do segundo lado: ');

readln(l2);

write('digite o valor do terceiro lado: ');

readln(l3);

if (l1 < l2 + l3) and (l2 < l1 + l3) and (l3 < l1 + l2) then

begin

if (l1 = l2) and (l2 = l3) then

begin

writeln ('triângulo eqüilátero.');

end

else

begin

if (l1 = l2) or (l1 = l3) or (l2 = l3) then

begin

writeln ('triângulo isósceles.');

end

else

begin

writeln ('triângulo escaleno.');

end;

end;

end

else

begin

writeln ('não é um triângulo.');

end;

End;

Program exercicio5;

Var a, b,c, delta,r1,r2:real;

begin

write('informe coeficiente a: ' );

read(a);

write('informe coeficiente b: ' );

read(b);

write('informe coeficiente c: ' );

read (c);

delta := sqr(b) - 4 * a * c ;

if (delta < 0) then

write ('não existem raízes ')

else

if (delta = 0) then

begin

r1 := - b / ( 2 * a );

r2 := r1 ;

write(' as raízes são iguais: ' , r1:0:2);

end

else

begin

r1 := ( - b + sqrt( delta )) / ( 2 * a );

r2 := ( - b - sqrt( delta )) / (

...

Baixar como (para membros premium)  txt (4.5 Kb)  
Continuar por mais 3 páginas »
Disponível apenas no TrabalhosGratuitos.com