ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Programacion


Enviado por   •  7 de Abril de 2014  •  1.427 Palabras (6 Páginas)  •  149 Visitas

Página 1 de 6

Contenido

CIEN. 3

DIEZ 4

Numeros 5

DEFINE SEXO 7

Carreras 8

Define Sexo y Edad 9

CIEN.

import java.io.*;

import javax.swing.JOptionPane;

public class Cien{

public static void main( String args[] )

{

String stnum;

int num;

stnum = JOptionPane.showInputDialog( "Ingrese un número" );

num = Integer.parseInt(stnum);

if(num>=100 || num<100 ){

if (num>=100){

JOptionPane.showMessageDialog(

null, "El número " + num + " Es mayor o igual a 100","resultado",

JOptionPane.PLAIN_MESSAGE );

System.exit( 0 );

}

else{

JOptionPane.showMessageDialog(

null, "El número " + num + " Es menor a 100","resultado",

JOptionPane.PLAIN_MESSAGE );

System.exit( 0 );

}}}} }

DIEZ

Import java.io.*;

import javax.swing.JOptionPane;

public class Diez{

public static void main( String args[] )

{

String stnum;

int num;

stnum = JOptionPane.showInputDialog( "Ingrese un número" );

num = Integer.parseInt(stnum);

if(num<10 || num>=10){

if (num >= 10){

JOptionPane.showMessageDialog(

null, "El número " + num + " Es mayor o igual a 10","resultado",

JOptionPane.PLAIN_MESSAGE );

System.exit( 0 );

}

else{

JOptionPane.showMessageDialog(

null, "El número " + num + " Es menor a 10","resultado",

JOptionPane.PLAIN_MESSAGE );

System.exit( 0 );

}}}}

_____________________________________________________________________________________

Numeros

import java.io.*;

import javax.swing.JOptionPane;

public class Numeros{

public static void main( String args[] )

{

String num;

String stnum;

int num1;

int num2;

num = JOptionPane.showInputDialog( "Ingrese el primer número" );

stnum = JOptionPane.showInputDialog( "Ingrese el segundo número","numero" );

num1 = Integer.parseInt(num);

num2 = Integer.parseInt(stnum);

if (num1 == num2){

JOptionPane.showMessageDialog(null, "Los números "+num1+" y "+num2+" son iguales","Resultado",

JOptionPane.PLAIN_MESSAGE );

...

Descargar como (para miembros actualizados)  txt (4.9 Kb)  
Leer 5 páginas más »
Disponible sólo en Clubensayos.com