package propuesto1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO1 {
public static void main(String[] args) throws IOException {
int a,b,s,r;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("a: ");
a=Integer.parseInt(in.readLine());//ojo
System.out.println("b: ");
b=Integer.parseInt(in.readLine());//ojo
s=a+b;
System.out.println("");
System.out.println("suma:" + s);
System.out.println();
r=a-b;
System.out.println("");
System.out.println("Resta:" + r);
System.out.println();
}
}
package propuesta2;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA2 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
int a,b,totalenteros;
System.out.println("a: ");
a=Integer.parseInt(in.readLine());//ojo
System.out.println("b: ");
b=Integer.parseInt(in.readLine());//ojo
totalenteros= a-b-1;
System.out.println("el total de enteros entre a y b es:
"+totalenteros);
}
}
package propuesta.pkg3;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA3 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
}
}
package propuesto4;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO4 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int a=(int) 6.0 , b=(int) 8.0;
int c,d,factor1;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("ingresar a:");
a=(int)Integer.parseInt(in.readLine());//ojo
System.out.println("ingresar b:");
b=(int)Integer.parseInt(in.readLine());//ojo
c=(int) ((4*Math.pow(a,4)+3*a*b+Math.pow(b,2))/(Math.pow(a,2)-
Math.pow(b,2)));
factor1 = (int) (3*(Math.pow(c,2))+a+b);
d=factor1/4;
System.out.println("");
System.out.println("el valor de c es:"+c+" y el valor de d es
:"+d);
System.out.println();
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto5;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author User
*/
public class PROPUESTO5 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
int a=80 , b=33 , c=20 , d=5 , suma;
suma=a+b+c+d;
//si suma ----100%
//variable(a,b,c,d)--
x%,entonces:variable(a,b,c,d)=valor*100/suma
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("ingresar a: ");
a=(int)Integer.parseInt(in.readLine());//ojo
int porcentaje_a=(int)(a*100)/(int)suma;
porcentaje_a=(porcentaje_a*1000)/1000;
System.out.println("ingresar b: ");
b=(int)Integer.parseInt(in.readLine());//ojo
int porcentaje_b=(int)(b*100)/(int)suma;
porcentaje_b=(porcentaje_b*1000)/1000;
System.out.println("ingresar c: ");
c=(int)Integer.parseInt(in.readLine());//ojo
int porcentaje_c=(int)(c*100)/(int)suma;
porcentaje_c=(porcentaje_c*1000)/1000;
System.out.println("ingresar d: ");
d=(int)Integer.parseInt(in.readLine());//ojo
int porcentaje_d=(int)(d*100)/(int)suma;
porcentaje_d=(porcentaje_d*1000)/1000;
System.out.println("");
System.out.println("la variable"a"representa
el:"+porcentaje_a+"% de"+suma);
System.out.println("la variable"b"representa
el:"+porcentaje_b+"% de"+suma);
System.out.println("la variable"c"representa
el:"+porcentaje_c+"% de"+suma);
System.out.println("la variable"d"representa
el:"+porcentaje_d+"% de"+suma);
System.out.println();
}
}
package propuesto6;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO6 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int lado=5;
int perimetro,area;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("perimetro: ");
perimetro=(int) Integer.parseInt(in.readLine());//ojo
System.out.println("area: ");
area=(int) Integer.parseInt(in.readLine());//ojo
perimetro=5*4;
area=(int) Math.pow(lado,2);
System.out.println("");
System.out.println("el perimetro del cuadrado de lado
"+lado+"es"+perimetro+"y su area es"+area);
System.out.println();
}
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesta7;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
*
* @author User
*/
public class PROPUESTA7 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
int MINUTO=60;
int SEGUNDO=3600;
int c,m,s;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Cantidad de horas: ");
c=(int)Integer.parseInt(in.readLine());//ojo
m=c / MINUTO;
s=c % MINUTO;
c=s / SEGUNDO;
c=m % SEGUNDO;
System.out.println("");
System.out.println("Minutos:" + m);
System.out.println("Segundos:" + s);
System.out.println();
}
}
package propuesto.pkg8;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO8 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int f = 50;
float c,k;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Introduz Grados fahrenheit para su
conversión");
c=Integer.parseInt(in.readLine());//ojo
k=Integer.parseInt(in.readLine());//ojo
c=(float) ((f*0.5)-32);
k=(float) (((f*0.5)-32)+273.15);
System.out.println("el resultado de grados celsius es:"+c);
System.out.println("el resultado de grados kelvin es:"+k);
}
}
package propuesto.pkg9;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO9 {
@SuppressWarnings("empty-statement")
public static void main(String[] args) throws IOException {
// TODO code application logic here
}
}
package propuesta10;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA10 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int S,C;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("ingresar los grados sexagesimales: ");
S=Integer.parseInt(in.readLine());//ojo
C=((200*S)/180);
System.out.println("los grados centesimales es :"+C);
}
}
package propuesto.pkg11;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO11 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int e;
String r="";
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("Edad:");
e=Integer.parseInt(in.readLine());//ojo;
//PROCESO
if(e>=18){
r="MAYOR DE EDAD";
}
if(e<18){
r="MENOR DE EDAD";
}
//SALIDA
System.out.println("");
System.out.println("LA PERSONA ES "+r);
}
}
package propuesta12;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA12 {
public static void main(String[] args) throws IOException {
int n1, n2, me=0;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Numero 1: ");
n1=(int) Integer.parseInt(in.readLine());//ojo
System.out.println("Numero 2: ");
n2=(int) Integer.parseInt(in.readLine());//ojo
if(n1<n2)
me=n1;
if(n2<n1)
me=n2;
System.out.println("");
System.out.println("Menor:" + me);
System.out.println();
}
}
package propuesto.pkg13;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTO13 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int a,b;
String S;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("Primer numero:");
a=Integer.parseInt(in.readLine());//ojo
System.out.print("Segundo numero:");
b=Integer.parseInt(in.readLine());//ojo
if (a==b){
S="Iguales";
}else{
S="Diferentes";
}
System.out.println("");
System.out.println("Son:"+S);
}
}
package propuesta.pkg14;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA14 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int a,r;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("Escribir numero:");
a=Integer.parseInt(in.readLine());//ojo
if (a>0){
r=a*2;
}else{
if (a<0){
r=a*3;
}else{
r=0;
}
}
System.out.println("");
System.out.println("Resultado:"+r);
}
}
package propuesta15;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA15 {
public static void main(String[] args) throws IOException {
int n1,n2,n3,menor,inter,mayor;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Numero 1: ");
n1= Integer.parseInt(in.readLine());//ojo
System.out.println("Numero 2: ");
n2=Integer.parseInt(in.readLine());//ojo
System.out.println("Numero 3: ");
n3= Integer.parseInt(in.readLine());//ojo
if(n1 < n2 && n1 < n3)
{
menor=n1;
}
else
{
if (n2 < n1 && n2< n3)
{
menor=n2;
}
else
{
menor=n3;
}
}
if(n1 > n2 && n1 > n3)
{
mayor=n1;
}
else
{
if (n2 > n1 && n2 > n3)
{
mayor=n2;
}
else
{
mayor=n3;
}
}
inter=(n1 + n2 + n3)- (menor + mayor);
System.out.println("");
System.out.println("Menor:" + menor);
System.out.println("Inter:" + inter);
System.out.println("Mayor:" + mayor);
System.out.println("Mayor:" + mayor);
System.out.println("Inter:" + inter);
System.out.println("Menor:" + menor);
System.out.println();
}
}
package propuesta.pkg16;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA16 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int a,b,c,d,PROMEDIO=0;
String M;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("Primera nota:");
a=Integer.parseInt(in.readLine());//ojo
System.out.print("Segunda nota:");
b=Integer.parseInt(in.readLine());//ojo
System.out.print("Tercera nota:");
c=Integer.parseInt(in.readLine());//ojo
System.out.print("Cuarta nota:");
d=Integer.parseInt(in.readLine());//ojo
if(a<b && a<c && a<d){
PROMEDIO=(b+c+d)/3;
}else{
if (b<a && b<c && b<d){
PROMEDIO=(a+c+d)/3;
}else{
if (c<a && c<b && c<d){
PROMEDIO=(a+b+d)/3;
}else{
PROMEDIO=(a+b+c)/3;
}
}
}
if(PROMEDIO>=15){
M="Aprobado";
}else{
M="Desaprobado";
}
System.out.println("");
System.out.println("Resultado:"+PROMEDIO);
System.out.println("Mensaje:"+M);
}
}
package propuesta.pkg17;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA17 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int sa,mt,sactual=0;
float tm;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("ingrese saldo :");
sa=Integer.parseInt(in.readLine());//ojo
System.out.print("ingrese tipo de movimiento:");
tm=Integer.parseInt(in.readLine());//ojo
System.out.print("ingrese monto:");
mt=Integer.parseInt(in.readLine());//ojo
if(tm== 1){
sactual = sa - mt;
}else{
if(tm== 2){
sactual = sa + mt;
}
}
System.out.print("el saldo actual es:"+sactual);
}
}
package propuesta.pkg18;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class PROPUESTA18 {
public static void main(String[] args) throws IOException {
// TODO code application logic here
int A,B;
String C = "";
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.print("PRIMER NUMERO:");
A=Integer.parseInt(in.readLine());//ojo
System.out.print("SEGUNDO NUMERO:");
B=Integer.parseInt(in.readLine());//ojo
if(A>B){
C = "A Es Mayor que B";
}else{
if(B>A){
C = "B Es Mayor que A";
}
}
if(A==B){
C = "A Es igual a B";
}
System.out.println("RESULTADO: " +C);
}
}

Propuesta..sujei

  • 1.
    package propuesto1; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTO1 { public static void main(String[] args) throws IOException { int a,b,s,r; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=Integer.parseInt(in.readLine());//ojo System.out.println("b: "); b=Integer.parseInt(in.readLine());//ojo s=a+b; System.out.println(""); System.out.println("suma:" + s); System.out.println(); r=a-b; System.out.println(""); System.out.println("Resta:" + r); System.out.println(); } } package propuesta2; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTA2 { public static void main(String[] args) throws IOException { // TODO code application logic here BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); int a,b,totalenteros; System.out.println("a: "); a=Integer.parseInt(in.readLine());//ojo System.out.println("b: "); b=Integer.parseInt(in.readLine());//ojo totalenteros= a-b-1; System.out.println("el total de enteros entre a y b es: "+totalenteros); } }
  • 2.
    package propuesta.pkg3; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTA3 { public static void main(String[] args) throws IOException { // TODO code application logic here BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); } } package propuesto4; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTO4 { public static void main(String[] args) throws IOException { // TODO code application logic here int a=(int) 6.0 , b=(int) 8.0; int c,d,factor1; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ingresar a:"); a=(int)Integer.parseInt(in.readLine());//ojo System.out.println("ingresar b:"); b=(int)Integer.parseInt(in.readLine());//ojo c=(int) ((4*Math.pow(a,4)+3*a*b+Math.pow(b,2))/(Math.pow(a,2)- Math.pow(b,2))); factor1 = (int) (3*(Math.pow(c,2))+a+b); d=factor1/4; System.out.println(""); System.out.println("el valor de c es:"+c+" y el valor de d es :"+d); System.out.println(); } }
  • 3.
    /* * To changethis template, choose Tools | Templates * and open the template in the editor. */ package propuesto5; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * * @author User */ public class PROPUESTO5 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here int a=80 , b=33 , c=20 , d=5 , suma; suma=a+b+c+d; //si suma ----100% //variable(a,b,c,d)-- x%,entonces:variable(a,b,c,d)=valor*100/suma BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ingresar a: "); a=(int)Integer.parseInt(in.readLine());//ojo int porcentaje_a=(int)(a*100)/(int)suma; porcentaje_a=(porcentaje_a*1000)/1000; System.out.println("ingresar b: "); b=(int)Integer.parseInt(in.readLine());//ojo int porcentaje_b=(int)(b*100)/(int)suma; porcentaje_b=(porcentaje_b*1000)/1000; System.out.println("ingresar c: "); c=(int)Integer.parseInt(in.readLine());//ojo int porcentaje_c=(int)(c*100)/(int)suma; porcentaje_c=(porcentaje_c*1000)/1000; System.out.println("ingresar d: "); d=(int)Integer.parseInt(in.readLine());//ojo int porcentaje_d=(int)(d*100)/(int)suma; porcentaje_d=(porcentaje_d*1000)/1000; System.out.println(""); System.out.println("la variable"a"representa el:"+porcentaje_a+"% de"+suma); System.out.println("la variable"b"representa el:"+porcentaje_b+"% de"+suma); System.out.println("la variable"c"representa el:"+porcentaje_c+"% de"+suma); System.out.println("la variable"d"representa el:"+porcentaje_d+"% de"+suma); System.out.println(); } }
  • 4.
    package propuesto6; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTO6 { public static void main(String[] args) throws IOException { // TODO code application logic here int lado=5; int perimetro,area; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("perimetro: "); perimetro=(int) Integer.parseInt(in.readLine());//ojo System.out.println("area: "); area=(int) Integer.parseInt(in.readLine());//ojo perimetro=5*4; area=(int) Math.pow(lado,2); System.out.println(""); System.out.println("el perimetro del cuadrado de lado "+lado+"es"+perimetro+"y su area es"+area); System.out.println(); } } /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesta7; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; /** * * @author User */ public class PROPUESTA7 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here int MINUTO=60; int SEGUNDO=3600;
  • 5.
    int c,m,s; BufferedReader in=newBufferedReader(new InputStreamReader(System.in)); System.out.println("Cantidad de horas: "); c=(int)Integer.parseInt(in.readLine());//ojo m=c / MINUTO; s=c % MINUTO; c=s / SEGUNDO; c=m % SEGUNDO; System.out.println(""); System.out.println("Minutos:" + m); System.out.println("Segundos:" + s); System.out.println(); } } package propuesto.pkg8; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTO8 { public static void main(String[] args) throws IOException { // TODO code application logic here int f = 50; float c,k; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Introduz Grados fahrenheit para su conversión"); c=Integer.parseInt(in.readLine());//ojo k=Integer.parseInt(in.readLine());//ojo c=(float) ((f*0.5)-32); k=(float) (((f*0.5)-32)+273.15); System.out.println("el resultado de grados celsius es:"+c); System.out.println("el resultado de grados kelvin es:"+k); } }
  • 6.
    package propuesto.pkg9; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTO9 { @SuppressWarnings("empty-statement") public static void main(String[] args) throws IOException { // TODO code application logic here } } package propuesta10; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTA10 { public static void main(String[] args) throws IOException { // TODO code application logic here int S,C; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("ingresar los grados sexagesimales: "); S=Integer.parseInt(in.readLine());//ojo C=((200*S)/180); System.out.println("los grados centesimales es :"+C); } } package propuesto.pkg11; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTO11 { public static void main(String[] args) throws IOException { // TODO code application logic here
  • 7.
    int e; String r=""; BufferedReaderin=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Edad:"); e=Integer.parseInt(in.readLine());//ojo; //PROCESO if(e>=18){ r="MAYOR DE EDAD"; } if(e<18){ r="MENOR DE EDAD"; } //SALIDA System.out.println(""); System.out.println("LA PERSONA ES "+r); } } package propuesta12; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTA12 { public static void main(String[] args) throws IOException { int n1, n2, me=0; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Numero 1: "); n1=(int) Integer.parseInt(in.readLine());//ojo System.out.println("Numero 2: "); n2=(int) Integer.parseInt(in.readLine());//ojo if(n1<n2) me=n1; if(n2<n1) me=n2; System.out.println(""); System.out.println("Menor:" + me); System.out.println(); } }
  • 8.
    package propuesto.pkg13; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTO13 { public static void main(String[] args) throws IOException { // TODO code application logic here int a,b; String S; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Primer numero:"); a=Integer.parseInt(in.readLine());//ojo System.out.print("Segundo numero:"); b=Integer.parseInt(in.readLine());//ojo if (a==b){ S="Iguales"; }else{ S="Diferentes"; } System.out.println(""); System.out.println("Son:"+S); } } package propuesta.pkg14; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTA14 { public static void main(String[] args) throws IOException { // TODO code application logic here int a,r; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Escribir numero:"); a=Integer.parseInt(in.readLine());//ojo if (a>0){ r=a*2; }else{ if (a<0){ r=a*3;
  • 9.
    }else{ r=0; } } System.out.println(""); System.out.println("Resultado:"+r); } } package propuesta15; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTA15 { public static void main(String[] args) throws IOException { int n1,n2,n3,menor,inter,mayor; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Numero 1: "); n1= Integer.parseInt(in.readLine());//ojo System.out.println("Numero 2: "); n2=Integer.parseInt(in.readLine());//ojo System.out.println("Numero 3: "); n3= Integer.parseInt(in.readLine());//ojo if(n1 < n2 && n1 < n3) { menor=n1; } else { if (n2 < n1 && n2< n3) { menor=n2; } else { menor=n3; } } if(n1 > n2 && n1 > n3) { mayor=n1; } else { if (n2 > n1 && n2 > n3) { mayor=n2; } else
  • 10.
    { mayor=n3; } } inter=(n1 + n2+ n3)- (menor + mayor); System.out.println(""); System.out.println("Menor:" + menor); System.out.println("Inter:" + inter); System.out.println("Mayor:" + mayor); System.out.println("Mayor:" + mayor); System.out.println("Inter:" + inter); System.out.println("Menor:" + menor); System.out.println(); } } package propuesta.pkg16; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class PROPUESTA16 { public static void main(String[] args) throws IOException { // TODO code application logic here int a,b,c,d,PROMEDIO=0; String M; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Primera nota:"); a=Integer.parseInt(in.readLine());//ojo System.out.print("Segunda nota:"); b=Integer.parseInt(in.readLine());//ojo System.out.print("Tercera nota:"); c=Integer.parseInt(in.readLine());//ojo System.out.print("Cuarta nota:"); d=Integer.parseInt(in.readLine());//ojo if(a<b && a<c && a<d){ PROMEDIO=(b+c+d)/3; }else{ if (b<a && b<c && b<d){ PROMEDIO=(a+c+d)/3; }else{ if (c<a && c<b && c<d){ PROMEDIO=(a+b+d)/3; }else{ PROMEDIO=(a+b+c)/3; } } } if(PROMEDIO>=15){ M="Aprobado"; }else{
  • 11.
    M="Desaprobado"; } System.out.println(""); System.out.println("Resultado:"+PROMEDIO); System.out.println("Mensaje:"+M); } } package propuesta.pkg17; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTA17 { public static void main(String[] args) throws IOException { // TODO code application logic here int sa,mt,sactual=0; float tm; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("ingrese saldo :"); sa=Integer.parseInt(in.readLine());//ojo System.out.print("ingrese tipo de movimiento:"); tm=Integer.parseInt(in.readLine());//ojo System.out.print("ingrese monto:"); mt=Integer.parseInt(in.readLine());//ojo if(tm== 1){ sactual = sa - mt; }else{ if(tm== 2){ sactual = sa + mt; } } System.out.print("el saldo actual es:"+sactual); } }
  • 12.
    package propuesta.pkg18; import java.io.BufferedReader; importjava.io.IOException; import java.io.InputStreamReader; public class PROPUESTA18 { public static void main(String[] args) throws IOException { // TODO code application logic here int A,B; String C = ""; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("PRIMER NUMERO:"); A=Integer.parseInt(in.readLine());//ojo System.out.print("SEGUNDO NUMERO:"); B=Integer.parseInt(in.readLine());//ojo if(A>B){ C = "A Es Mayor que B"; }else{ if(B>A){ C = "B Es Mayor que A"; } } if(A==B){ C = "A Es igual a B"; } System.out.println("RESULTADO: " +C); } }