elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales


  Mostrar Temas
Páginas: [1]
1  Programación / Programación General / Pasar Java. Pseint en: 25 Noviembre 2016, 20:32 pm
Hola necesito pasar este codigo a pseint
Código
  1. package PROGAMAS;
  2. import javax.swing.JOptionPane;
  3.  
  4. //no neserariamente por simbolos solo modifica los simbolos por cualquier otra letra
  5.  
  6. // @author jesus
  7.  
  8. public class cambio {
  9.  
  10.    /**
  11.      * @param args the command line arguments
  12.      */
  13.    public static void main(String[] args) {
  14.        // TODO code application logic here
  15.        String cadena,cadena2=””;
  16.        int largo;
  17.        char w;
  18.  
  19.        cadena=JOptionPane.showInputDialog(“escribe tu frase “);
  20.        largo=cadena.length();
  21.        for(int x=0;x<largo;x++){
  22.           w=cadena.charAt(x);
  23.            if(w==’a’){
  24.                w=%;
  25.  
  26.            }
  27.           if(w==’e’){
  28.                w=*;
  29.  
  30.            }
  31.           if(w==’i’){
  32.                w=+;
  33.  
  34.            }
  35.           if(w==’o’){
  36.                w=’#’;
  37.  
  38.            }
  39.          if(w==’u’){
  40.                w=’$’;
  41.                cadena2=cadena2+w;
  42.  
  43.            }
  44.          else{
  45.                cadena2=cadena2+w;
  46.          }
  47.        }
  48.        System.out.println(cadena2);
  49.    }
  50.  
  51. }
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines