Preguntas De Taller De Sotfware 1 (seudocodigo)
Enviado por lupecarort • 25 de Octubre de 2013 • 972 Palabras (4 Páginas) • 196 Visitas
DESARROLLO DE PREGUNTAS
1)
A) .-var s,h,m;
s="M";
h=0;
m=0;
if (s=="M"){
h=h+1;}
else{
m=m+1;}
showAt("Hombres="+h +" "+"Mujeres="+m,1,6);
B).-var com,v;
v=1000;
if(v<150){
com=0.03*v;}
else;
{com=0.05*v;}
showAt("la comici es"+com,1,4);
C).-var ig,v;
v=1000;
if(v<=500){
ig=0.06+v;}
else
{ig=0.035*v;}
{ig=0.05*v;}
showAt("IMPUESTO GLOVAL DEVENTAS ES="+ig,1,8);
D).-var T;
T=0;
if(T==0){
T=T+0;}
else{
T=T+1;}
showAt("el valorde t es="+T,1,11);
E).-var a,b,v;
v=200;
a=10;
if(a>5)
{b=v*0.01;}
else
{b=100*0;}
showAt(" la bonificacion es="+b,1,12);
F).-var i,j,k;
i=30;
j=12;
if(i/j>4.7){
k=i+j;}
else{
k=i-j;}
showAt("K es igual= "+k,1,14);
G).-var da,di,df;
da=6;
di=20;
if(da<=7){
df=di-5;
showAt("Usted pierde S/.5, le queda= S/."+df,1,16);}
else{
df=di+5;
showAt("Usted gana S/.5, tiene= S/."+df,1,17);}
1).-var x;
x=8;
if(x%2==0){
showAt(x+"es par",1,18);}
else{
shoAt(x+"es impar",1,19);}
2).-var x,y;
x=random(21);
y=random(21);
if(x!=y){
if(x>y){
showAt("El numero mayor es= "+x,1,20);}
else{
showAt("El numero mayor es= "+y,1,21);}}
else{
showAt("Los numeros son iguales= "+x+" = "+y,1,22);}
2.-
//declarar variables
var x,y;
//asignar valor
x=random(21);
y=random(21);
//calcular
if(x!=y){
if(x>y){
showAt("El numero mayor es= "+x,5,10);}
else{
showAt("El numero mayor es= "+y,5,10);}}
else{
showAt("Los numeros son iguales= "+x+" = "+y,3,10);}
3:_
var a,b,divicion,mensaje;
a=random(10);
b=random(10);
if((a>=0)&&(b!=0)){
mensaje="es divicible";
divicion=a/b;
} else{
mensaje="no es divisible";
divicion="no existe";
}
print(divicion);
showAt("divicion es: "+ divicion,2,3);
showAt("mensaje: "+mensaje,4,4);
showAt("diagnostico: "+pasiente,4,4);
5.-var a,b,residuo,divicion;
a=random(10.0)+1.0;
b=random(10.0)+1.0;
if(a%2!=0){
divicion=a/b;
residuo=a-b*divicion;
}else{
divicion=a/b;
}
print(divicion);
6.-
var s,i;
s=random(800)+100;
if(s<=500){
i=s*0.18;}
else{
i=s*0.2;}
showAt("El interes es= "+i,5,10);
7.-
var x,y;
x=random(10);
if((x>=-3)&&(x<=2)){
y=x*x+2*x-3;
} if((x>2)&&(x<=10)){
y=5*x+7;
} else{
y=0;
}
print(y);
9.-
var edadMes,edadA,fraccion;
edadMes=random(60)+1;
if(edadMes%2==0){
edadA=edadMes/12;
fraccion=edadMes-12*edadA;
} else{
edadA=edadMes/12;
fraccion=edadMes-12*edadA;
}
print(edadA);
print(fraccion);
showAt("tiene: "+edadA + " anos y " + fraccion+ " meses",4,4);
13.-
var x,y,infPul,temAlt,pasiente,catarro,pulmonia,normal,garImfl,sintoma,diagnostico;
x=random(2);
y=random(2);
if((x==0)&&(y==0)){
pasiente="pulmonia";
}else{
pasiente="normal";
}
if((x==1)&&(y==1)){
pasiente="resfrio"; }
15.-
var totalP,compra,impuesto,descuento;
compra=random(1000)+1;
impuesto=random(1000)+1;
if(compra<=500){
impuesto=0.06*compra;
totalP=compra+impuesto;
}else {
impuesto=0.85*compra;
totalP=compra+impuesto;
}
if(impuesto>550){
descuento=0.01*impuesto;
totalP=compra+impuesto-descuento;
}
showAt(totalP,6,5);
showAt(compra,6,6);
showAt(impuesto,6,7);
19.-
var x,y,z,mensaje;
x=random(13);
if(x>=0){
y=x+1;
z=x+2;
mensaje="x>y>z";
}
print(mensaje);
21).-var pb,e,d;
d=random(1500);
e=random(15);
if((d>1000)&&(e>7));{
pb=d*8.50-d*0.30;}
elese
{pb=d*8.50;}
print(pb);
23).-var a,b,c,d,f;
x=4;
x=5;
x=6;
x=7;
x=8;
if(a==4);{
x="a";}
if(b==5);{
x=b;}
if(==6);{
x="c";}
if(x==7);{
x="d";}
if(x==8){
x="f";}
print(x);
25:_var a,b,c,mensaje;
a=random(6);
b=random(5);
c=random(3);
if(pow(a,2)==pow(b,2)+pow(c,2)){
mensaje="triangulo rectangulo";
}
if(pow(a,2)<pow(b,2)+pow(c,2)){
mensaje="triangulo acutangulo";}
if(pow(a,2)>pow(b,2)+pow(c,2)){
mensaje="triangulo obstuangulo";}
print(mensaje);
27:-var n,nb;
n=random(21);
if(n<5){
nb=n+0;}
if((n>=5)&&(n<10)){
nb=n+2;}
if((n>=10)&&(n<15)){
nb=n+3;}
else{
nb=n+4;
...