Codigo Java

Páginas: 2 (379 palabras) Publicado: 29 de noviembre de 2012
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package ejercicio_extra_clase;
import java.util.*;
/**
*
*
*/
public classoperaciones_basicas {
public static void main(String[]args){
int n,i,z,q;
Scanner leer= new Scanner (System.in);
System.out.println("este programa hace las operacionesbasicas de aritmeticas de los numeros que deseas");
System.out.println("EL MENU DE OPERACIONES A HACER ES");
System.out.println("1.- SUMA DE TUS NUMEROS" );System.out.println("2.- RESTA DE TUS NUMEROS" );
System.out.println("3.- MULTIPLICACION DE TUS NUMEROS" );
System.out.println("4.- DIVISION DE TUS NUMEROS" );
do{System.out.println("ELIJE LA OPCION QUE MAS TE CONVENGA" );
z=leer.nextInt();
switch(z)
{
case 1:
int suma;System.out.println ("Ingresa numero con el que quieres comenzar tu suma:");
suma = leer.nextInt();
int num,op;

do {System.out.println ("Ingresa numero para sumar");
num = leer.nextInt();
suma = suma + num;
System.out.println ("La suma detusnumeros es: "+suma);

System.out.println ("Ingresar otro? 1)Si / 2)No");
op = leer.nextInt();
} while (op==1);break;
case 2:
int resta;
System.out.println ("Ingresa numero con el quieres comenzar tu resta");
resta =leer.nextInt();
int num1,op1;
do {

System.out.println ("Ingresa numero para restar");
num1 = leer.nextInt();...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Codigos De Java
  • codigo java
  • Codigo java
  • codigo java
  • Codigos java
  • Codigo java
  • Codigos Java
  • Codigo Java

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS