introduccion a las tecnologías
Java no es muy diferente a Pseint pues de hecho la diferrncia es que enjava se utiliza en ingles y tienes siempre que poner al inicio:
import java.io.*;
Import java.text.*;
Import java.util.*;
NUNCA OLVIDES PONER EL PUNTO Y COMA PORQUE ESO ES LO QUE CIERRA LAINSTRUCCION QUE DESEAS OCUPAR.
Para poder abrir un nuevo archivo es File>new>project>java project>pones el nombre>al projecto creado le das boton derecho>new>class y ya asi ya puedes comenzar a usarjava.
import java.io.*;
import java.util.*;
import java.text.*;
public class EJERCICIO {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated methodstub
Scanner Leer = new Scanner(System.in);
PrintWriter Escribir = new PrintWriter(System.out, true);
int num;
int v;
double val;
Escribir.println("Dame la variable NUM");num = Leer.nextInt();
Escribir.println("Dame la variable V");
v = Leer.nextInt();
switch (num){
case 1:
val=100*v;
Escribir.println("RESULTADO: "+ val);
break;case 2:
val = Math.pow(100, v);
Escribir.println("RESULTADO: "+ val);
break;
case 3:
val = 100 /v;
Escribir.println("RESULTADO: "+ val);
break;
default:Escribir.println("ERROR");
import java.io.*;
import java.util.*;
import java.text.*;
public class ejercicio2 {
/**
* @param args
*/
public static voidmain(String[] args) {
// TODO Auto-generated method stub
Scanner Leer = new Scanner(System.in);
PrintWriter Escribir = new PrintWriter(System.out, true);
int cate;
double sueldo;double total;
double total2;
Escribir.println("QUE CATEGORIA ES?");
cate = Leer.nextInt();
Escribir.println("DE CUANTO ES EL SUELDO");
sueldo = Leer.nextDouble();
switch(cate) {...
Regístrate para leer el documento completo.