Download 1) Muestre en pantalla el mensaje “bienvenido”. 1. Inicio 2. Mostrar
Document related concepts
no text concepts found
Transcript
1) Muestre en pantalla el mensaje “bienvenido”. 1. Inicio 2. Mostrar bienvenido 3. Fin Inicio Mostrar “bienvenido” Fin Textwindow.writeline (“bienvenido”) 2) Mostrar en pantalla el mensaje “small basic no tiene misterios” 1. Inicio 2. Mostrar mensaje “small basic no tiene misterios” 3. Fin Inicio Mostrar mensaje “small bacis no tiene misterios” fin Textwindow.writeline (“small basic no tiene misterios”) 3. Muestre en pantalla la suma de 100 y 120 3) 4) 5) 6) 7) Inicio p = 100, d= 120, q = 0 q= p+d mostrar en pantalla q fin inicio P=100 d=120 q=0 q= p+d Mostrar q fin p = 100 d = 120 q = p+d textwindow.writeline (“la suma total es” + q ) 4) muestre en pantalla el producto de 50 y 51 1. 2. 3. 4. 5. inicio s= 50, r = 5, d = 0 d=s*r mostrar en pantalla d fin Inicio S=50, r=5, d=0 d=s*r Visualizar d fin s = 50 r = 51 d = a*b textwindow.writeline (“el producto es” + d) 5 1. 2. 3. 4. 5. Guarde en la variable x el numero 23, en la variable y el numero 24 y en la variable z el numero 25 y muestre en pantalla la suma de los valores de las tres variables Inicio x = 23, y = 24, z = 25, s = 0 s = x+y+z mostrar en pantalla s fin inicio x = 23, y = 24, z = 25, s = 0 x = 23 Y = 24 s=x+y+z Z = 25 s=x+y+z textwindow.writeline (“el total de la suma es” + s) Visualizar s fin 6 1. 2. 3. 4. 5. Guarde en la variable x el numero 10 en la variable y el numero 11 y en la variable z el numero 12 y calcule su producto y guárdelo en la variable producto y muestre en pantalla el valor de la variable. Inicio x = 10, y = 11. Z = 12, producto = 0 producto = x*y*z visualizar producto fin Inicio x = 10 y = 11 x = 10, y = 11, z = 12, producto = 0 z = 12 producto = x*y*z textwindow.writeline (“el producto total es” + producto) Producto = x*y*z Visualizar producto Fin 7- Pida al usuario dos numero ( que se guardaran en las variables a y b) y muestre su suma 1. 2. 3. 4. 5. 6. 7. Inicio a = 0, b = 0, s = 0 Ingresar primer numer Ingresar segundo numero S=a+b Visualizar s Fin Inicio a= 0 b=0 c=0 d=o Ingresar primer numero Textwindow.writeline (“ingresar primer numero”) Ingresé segundo numero a = Textwindow. Read () texwindow.writelin (“ubgresar segundo numero”) b = textwindow.read () d=a+b D= a+b texwindow.writeline (“la suma total es” + d) Visualizar d fin 8- Pida al usuario dos números ( que se guardaran en las variables n1 y n2) y muestre en pantalla su producto. 1. 2. 3. 4. 5. 6. 7. Inicio N1= 0, n2 = 0, s = 0 Ingrese primer numero Ingrese segundo numero s = n1 * n2 Visualizar p Fin Inicio N1=0 N2=0 S=0 Ingrese primer número Ingrese segundo número Textwindow.writeline (“ingrese primer numero”) N1= textwindow.read () Textwindow.writeline (“ingrese segundo numero”) N2= textwindow.read () P = N1* N2 Textwindow.writeline (“el producto total es” + S) S= n1*n2 Visualizar p fin 9 1. 2. 3. 4. 5. 6. 7. Pida al usuario dos números enteros (que se guardaran en la variables dato 1 y dato2) y muestre en pantalla el resultado de dividir dato 1 y dato 2. Inicio Dato 1 = 0, dato2= 0, div = 0 Ingrese primer numero Ingrese segundo numero Div = dato1/dato2 Visualizar div Fin Textwindow.writeline (“ingrese un numero”) inicio Dato 1 = 0, dato 2 = 0 div = 0 Dato 1 = textwindow.read () Textwindow.writeline (“ingrese otro numero”) Dato 2 = textwindow.read () Div = dato 1 / dato 2 Textwindow.writeline (“el total de la división es “ + div) Ingrese primer número Ingrese segundo número div = dato 1 / dato 2 Visualizar div fin 10 Pida al usuario dos números reales que se guardaran en las variables dato 1 y dato 2 si dato 2 es cero, deberá mostrar mensaje de error, caso contrario mostrara el resultado de dividir dato 1 y dato 2. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Inicio DATO 1= 0,DATO 2= 0, div = 0 ingrese un numero ingrese segundo numero div = dato 1 / dato 2 si dato 2 = 0 visualizar mensaje de error (“ingrese un numero que no sea 0”) regresar paso 4 de lo contrario visualizar div fin del si fin INICIO Dato 1 = 0,dato 2 = 0, div = 0 Ingrese primer numero Ingrese segundo numero Si dato2 = 0 entonces visualizar ingrese numero que no sea cero Div = dato1/dato2 Visualizar div fin TextWindow.WriteLine("Ingrese primer número") dato1=TextWindow.Read() Regresar: TextWindow.WriteLine("Ingrese segundo número") dato2=textwindow.Read() If dato2=0 Then TextWindow.WriteLine("INGRESE NUMERO QUE NO SEA CERO") Goto Regresar: EndIf DIV=dato1/dato2 TextWindow.WriteLine("LA DIVISION TOTAL ES: "+t)