SlideShare a Scribd company logo
1 of 8
PROBLEMAS PROPUESTOS
11°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto011;
import java.io.*;
/**
*
* @author GARCIA
*/
public class Propuesto011 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int edad;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("ingresa la edad de cualquier persona");
edad = Integer.parseInt(in.readLine());
if(edad>=18)
System.out.println("la persona es mayor de edad");
else
System.out.println("la persona es menor de edad");
}
}
12°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto012;
import java.io.*;
/**
*
* @author GARCIA
*/
public class Propuesto012 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int n1,n2,m;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número 1: ");
n1= Integer.parseInt(in.readLine());
System.out.println("Número 2: ");
n2=Integer.parseInt(in.readLine());
if (n1>n2)
{
m=n2;
}
else
{
m=n1;
}
System.out.println("");
System.out.println("Menor: "+m);
}
}
13°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto013;
import java.io.*;
/**
*
* @author GARCIA
*/
public class Propuesto013 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
int a,b;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número 1: ");
a= Integer.parseInt(in.readLine());
System.out.println("Número 2: ");
b=Integer.parseInt(in.readLine());
if(a==b)
System.out.println("números son iguales");
else
System.out.println("números son diferentes");
}
}
14°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto014;
import java.util.Scanner;
/**
*
* @author GARCIA
*/
public class Propuesto014 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a,b;
Scanner teclado=new Scanner(System.in);
System.out.print("ESCRIBIR UN NÚMERO:");
a=teclado.nextInt();
//PROCESO
if (a>0){
b=a*2;
}else{
if (a<0){
b=a*3;
}else{
b=0;
}
}
System.out.println("");
System.out.println("EL RESULTADO ES: "+b);
}
}
15°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto015;
import java.util.Scanner;
/**
*
* @author GARCIA
*/
public class Propuesto015 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a,b,c,Ma=0,I=0,Me=0;
Scanner teclado=new Scanner(System.in);
System.out.print("PRIMER NÚMERO:");
a=teclado.nextInt();
System.out.print("SEGUNDO NÚMERO:");
b=teclado.nextInt();
System.out.print("TERCER NÚMERO:");
c=teclado.nextInt();
if (a>b && a>c){
Ma=a;
}else{
if (b>a && b>c){
Ma=b;
}else{
Ma=c;
}
}
if(a<b &&a<c){
Me=a;
}else{
if (b<a&&b<c){
Me=b;
}else{
Me=c;
}
}
I=(a+b+c)-(Ma + Me);
System.out.println("");
System.out.println("ORDEN DESCENDENTE: ");
System.out.println("MAYOR: "+Ma);
System.out.println("INTERMEDIO: "+I);
System.out.println("MENOR: "+Me);
System.out.println("ORDEN ASCENDENTE: ");
System.out.println("MENOR: "+Me);
System.out.println("INTERMEDIO: "+I);
System.out.println("MAYOR: "+Ma);
}
}
16°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto016;
import java.util.Scanner;
/**
*
* @author GARCIA
*/
public class Propuesto016 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a,b,c,d,Pr=0;
String X;
Scanner teclado=new Scanner(System.in);
System.out.print("NOTA 1:");
a=teclado.nextInt();
System.out.print("NOTA 2:");
b=teclado.nextInt();
System.out.print("NOTA 3:");
c=teclado.nextInt();
System.out.print("NOTA 4:");
d=teclado.nextInt();
if(a<b &&a<c && a<d){
Pr=(b+c+d)/3;
}else{
if (b<a&&b<c && b<d){
Pr=(a+c+d)/3;
}else{
if (c<a&&c<b && c<d){
Pr=(a+b+d)/3;
}else{
Pr=(a+b+c)/3;
}
}
}
if(Pr>=11){
X="APROBADO";
}else{
X="DESAPROBADO";
}
System.out.println("");
System.out.println("PROMEDIO: "+Pr);
System.out.println("CONDICIÓN: "+X);
}
}
17°/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto017;
import java.util.Scanner;
/**
*
* @author GARCIA
*/
public class PROPUESTO017 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int sal_ant, monto, sal_actual=0;
char tipo_mov;
Scanner teclado = new Scanner(System.in);
System.out.print("Ingresar el Saldo: ");
sal_ant=teclado.nextInt();
System.out.print("Ingresar el Tipo de Movimiento: ");
tipo_mov = teclado.next().charAt(0);
System.out.print("Ingresar el Monto: ");
monto=teclado.nextInt();
if(tipo_mov=='R'){
sal_actual = sal_ant - monto;
}
else
{
if(tipo_mov=='D'){
sal_actual = sal_ant + monto;
}
}
System.out.println("");
System.out.print("El saldo actual es: "+sal_actual);
System.out.println();
}
}
18°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package propuesto018;
import java.util.Scanner;
/**
*
* @author GARCIA
*/
public class PROPUESTO018 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int a,b;
String X = "";
Scanner teclado=new Scanner(System.in);
System.out.print("1er Número(A):");
a=teclado.nextInt();
System.out.print("2do Número(B):");
b=teclado.nextInt();
if(a>b){
X = "A es mayor que B";
}else{
if(b>a){
X = "B es Mayor que A";
}
}
if(a==b){
X = "A es igual a B";
}
System.out.println("");
System.out.println("EL RESULTADO ES: " +X);
}
}

More Related Content

What's hot

Антон Полухин. C++17
Антон Полухин. C++17Антон Полухин. C++17
Антон Полухин. C++17Sergey Platonov
 
成果整理表
成果整理表成果整理表
成果整理表neymasem
 
โปรแกรมย่อยและฟังก์ชั่นมาตรฐาน
โปรแกรมย่อยและฟังก์ชั่นมาตรฐานโปรแกรมย่อยและฟังก์ชั่นมาตรฐาน
โปรแกรมย่อยและฟังก์ชั่นมาตรฐานTipprapa Sungsinchai
 
C++14 reflections
C++14 reflections C++14 reflections
C++14 reflections corehard_by
 
Import java
Import javaImport java
Import javawildled
 
Practical JavaScript Programming - Session 3/8
Practical JavaScript Programming - Session 3/8Practical JavaScript Programming - Session 3/8
Practical JavaScript Programming - Session 3/8Wilson Su
 

What's hot (12)

Антон Полухин. C++17
Антон Полухин. C++17Антон Полухин. C++17
Антон Полухин. C++17
 
Dapan
DapanDapan
Dapan
 
成果整理表
成果整理表成果整理表
成果整理表
 
โปรแกรมย่อยและฟังก์ชั่นมาตรฐาน
โปรแกรมย่อยและฟังก์ชั่นมาตรฐานโปรแกรมย่อยและฟังก์ชั่นมาตรฐาน
โปรแกรมย่อยและฟังก์ชั่นมาตรฐาน
 
C#でゲームを作る2016 第1回
C#でゲームを作る2016 第1回C#でゲームを作る2016 第1回
C#でゲームを作る2016 第1回
 
C++14 reflections
C++14 reflections C++14 reflections
C++14 reflections
 
Import java
Import javaImport java
Import java
 
Practical JavaScript Programming - Session 3/8
Practical JavaScript Programming - Session 3/8Practical JavaScript Programming - Session 3/8
Practical JavaScript Programming - Session 3/8
 
Clinica
ClinicaClinica
Clinica
 
Sbaw090526
Sbaw090526Sbaw090526
Sbaw090526
 
Cajero
CajeroCajero
Cajero
 
Manual técnicas de programación pbc
Manual técnicas de programación pbcManual técnicas de programación pbc
Manual técnicas de programación pbc
 

Viewers also liked

如何在TOTOLINK路由器中設定電腦每次都拿到相同IP
如何在TOTOLINK路由器中設定電腦每次都拿到相同IP如何在TOTOLINK路由器中設定電腦每次都拿到相同IP
如何在TOTOLINK路由器中設定電腦每次都拿到相同IP臺灣塔米歐
 
Раннее обучение
Раннее обучениеРаннее обучение
Раннее обучениеGlavatskikh
 
如何將TOTOLINK路由器「恢復原廠預設值」
如何將TOTOLINK路由器「恢復原廠預設值」如何將TOTOLINK路由器「恢復原廠預設值」
如何將TOTOLINK路由器「恢復原廠預設值」臺灣塔米歐
 
Exploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýExploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýSecurity Session
 
Cv pr. confiant uag
Cv pr. confiant uagCv pr. confiant uag
Cv pr. confiant uagJoseph Nodin
 
Luke O Reilly (1765916) Digitial media
Luke O Reilly (1765916) Digitial mediaLuke O Reilly (1765916) Digitial media
Luke O Reilly (1765916) Digitial mediaLuke O Reilly
 
портфолио
портфолиопортфолио
портфолиоOlya Zyuzina
 
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?臺灣塔米歐
 
Biocuration - Crowdsourcing Gene Annotation
Biocuration - Crowdsourcing Gene AnnotationBiocuration - Crowdsourcing Gene Annotation
Biocuration - Crowdsourcing Gene AnnotationAnurag Priyam
 
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼臺灣塔米歐
 
Células plasmáticas
Células plasmáticasCélulas plasmáticas
Células plasmáticasmire_san
 
Ella the Engineer Concept
Ella the Engineer Concept Ella the Engineer Concept
Ella the Engineer Concept Anthony Onesto
 
Pantera rosa
Pantera rosaPantera rosa
Pantera rosadax2000
 
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...Institut de l'Elevage - Idele
 

Viewers also liked (18)

如何在TOTOLINK路由器中設定電腦每次都拿到相同IP
如何在TOTOLINK路由器中設定電腦每次都拿到相同IP如何在TOTOLINK路由器中設定電腦每次都拿到相同IP
如何在TOTOLINK路由器中設定電腦每次都拿到相同IP
 
Раннее обучение
Раннее обучениеРаннее обучение
Раннее обучение
 
如何將TOTOLINK路由器「恢復原廠預設值」
如何將TOTOLINK路由器「恢復原廠預設值」如何將TOTOLINK路由器「恢復原廠預設值」
如何將TOTOLINK路由器「恢復原廠預設值」
 
Exploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan KopeckýExploitace – od minulosti po současnost - Jan Kopecký
Exploitace – od minulosti po současnost - Jan Kopecký
 
Cv pr. confiant uag
Cv pr. confiant uagCv pr. confiant uag
Cv pr. confiant uag
 
Luke O Reilly (1765916) Digitial media
Luke O Reilly (1765916) Digitial mediaLuke O Reilly (1765916) Digitial media
Luke O Reilly (1765916) Digitial media
 
портфолио
портфолиопортфолио
портфолио
 
Estructura secuencial -garcia
Estructura secuencial -garciaEstructura secuencial -garcia
Estructura secuencial -garcia
 
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?
我要如何設定TOTOLINK路由器的VPN才能從大陸翻牆回來呢?
 
2012 3-18joomla結合運用-鼎益盛AJ
2012 3-18joomla結合運用-鼎益盛AJ2012 3-18joomla結合運用-鼎益盛AJ
2012 3-18joomla結合運用-鼎益盛AJ
 
Biocuration - Crowdsourcing Gene Annotation
Biocuration - Crowdsourcing Gene AnnotationBiocuration - Crowdsourcing Gene Annotation
Biocuration - Crowdsourcing Gene Annotation
 
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼
我已經按照說明書設定完成,但TOTOLINK路由器的網路連線狀態卻顯示”錯誤的IP或密碼
 
Células plasmáticas
Células plasmáticasCélulas plasmáticas
Células plasmáticas
 
Ella the Engineer Concept
Ella the Engineer Concept Ella the Engineer Concept
Ella the Engineer Concept
 
Jitender resume
Jitender resumeJitender resume
Jitender resume
 
FLE%20Matrix
FLE%20MatrixFLE%20Matrix
FLE%20Matrix
 
Pantera rosa
Pantera rosaPantera rosa
Pantera rosa
 
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...
Conduite des chèvres en lactation longue, par les équipes Réseaux d'élevage P...
 

More from Daneziita Laulate Flores (11)

Dane
DaneDane
Dane
 
Resumen del libro kendall daneziita
Resumen del libro kendall daneziitaResumen del libro kendall daneziita
Resumen del libro kendall daneziita
 
Resumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulteResumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulte
 
Resumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulteResumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulte
 
Contabilidad de costos 1
Contabilidad de costos 1Contabilidad de costos 1
Contabilidad de costos 1
 
Resumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulteResumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulte
 
Resumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulteResumen del libro kendall daneziita laulte
Resumen del libro kendall daneziita laulte
 
Resumen del libro kendall
Resumen del libro kendall Resumen del libro kendall
Resumen del libro kendall
 
Boleta
BoletaBoleta
Boleta
 
Problemas condicionales
Problemas condicionalesProblemas condicionales
Problemas condicionales
 
Algoritmo secuencial
Algoritmo secuencialAlgoritmo secuencial
Algoritmo secuencial
 

Problemas propuestos -garcia

  • 1. PROBLEMAS PROPUESTOS 11° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto011; import java.io.*; /** * * @author GARCIA */ public class Propuesto011 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int edad; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("ingresa la edad de cualquier persona"); edad = Integer.parseInt(in.readLine()); if(edad>=18) System.out.println("la persona es mayor de edad"); else System.out.println("la persona es menor de edad"); } }
  • 2. 12° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto012; import java.io.*; /** * * @author GARCIA */ public class Propuesto012 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int n1,n2,m; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número 1: "); n1= Integer.parseInt(in.readLine()); System.out.println("Número 2: "); n2=Integer.parseInt(in.readLine()); if (n1>n2) { m=n2; } else { m=n1; } System.out.println(""); System.out.println("Menor: "+m); } }
  • 3. 13° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto013; import java.io.*; /** * * @author GARCIA */ public class Propuesto013 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ int a,b; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número 1: "); a= Integer.parseInt(in.readLine()); System.out.println("Número 2: "); b=Integer.parseInt(in.readLine()); if(a==b) System.out.println("números son iguales"); else System.out.println("números son diferentes"); } }
  • 4. 14° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto014; import java.util.Scanner; /** * * @author GARCIA */ public class Propuesto014 { /** * @param args the command line arguments */ public static void main(String[] args) { int a,b; Scanner teclado=new Scanner(System.in); System.out.print("ESCRIBIR UN NÚMERO:"); a=teclado.nextInt(); //PROCESO if (a>0){ b=a*2; }else{ if (a<0){ b=a*3; }else{ b=0; } } System.out.println(""); System.out.println("EL RESULTADO ES: "+b); } }
  • 5. 15° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto015; import java.util.Scanner; /** * * @author GARCIA */ public class Propuesto015 { /** * @param args the command line arguments */ public static void main(String[] args) { int a,b,c,Ma=0,I=0,Me=0; Scanner teclado=new Scanner(System.in); System.out.print("PRIMER NÚMERO:"); a=teclado.nextInt(); System.out.print("SEGUNDO NÚMERO:"); b=teclado.nextInt(); System.out.print("TERCER NÚMERO:"); c=teclado.nextInt(); if (a>b && a>c){ Ma=a; }else{ if (b>a && b>c){ Ma=b; }else{ Ma=c; } } if(a<b &&a<c){ Me=a; }else{ if (b<a&&b<c){ Me=b; }else{ Me=c; } } I=(a+b+c)-(Ma + Me); System.out.println(""); System.out.println("ORDEN DESCENDENTE: "); System.out.println("MAYOR: "+Ma); System.out.println("INTERMEDIO: "+I); System.out.println("MENOR: "+Me); System.out.println("ORDEN ASCENDENTE: "); System.out.println("MENOR: "+Me); System.out.println("INTERMEDIO: "+I);
  • 6. System.out.println("MAYOR: "+Ma); } } 16° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto016; import java.util.Scanner; /** * * @author GARCIA */ public class Propuesto016 { /** * @param args the command line arguments */ public static void main(String[] args) { int a,b,c,d,Pr=0; String X; Scanner teclado=new Scanner(System.in); System.out.print("NOTA 1:"); a=teclado.nextInt(); System.out.print("NOTA 2:"); b=teclado.nextInt(); System.out.print("NOTA 3:"); c=teclado.nextInt(); System.out.print("NOTA 4:"); d=teclado.nextInt(); if(a<b &&a<c && a<d){ Pr=(b+c+d)/3; }else{ if (b<a&&b<c && b<d){ Pr=(a+c+d)/3; }else{ if (c<a&&c<b && c<d){ Pr=(a+b+d)/3; }else{ Pr=(a+b+c)/3; } } } if(Pr>=11){ X="APROBADO"; }else{ X="DESAPROBADO"; } System.out.println("");
  • 7. System.out.println("PROMEDIO: "+Pr); System.out.println("CONDICIÓN: "+X); } } 17°/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto017; import java.util.Scanner; /** * * @author GARCIA */ public class PROPUESTO017 { /** * @param args the command line arguments */ public static void main(String[] args) { int sal_ant, monto, sal_actual=0; char tipo_mov; Scanner teclado = new Scanner(System.in); System.out.print("Ingresar el Saldo: "); sal_ant=teclado.nextInt(); System.out.print("Ingresar el Tipo de Movimiento: "); tipo_mov = teclado.next().charAt(0); System.out.print("Ingresar el Monto: "); monto=teclado.nextInt(); if(tipo_mov=='R'){ sal_actual = sal_ant - monto; } else { if(tipo_mov=='D'){ sal_actual = sal_ant + monto; } } System.out.println(""); System.out.print("El saldo actual es: "+sal_actual); System.out.println(); } }
  • 8. 18° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package propuesto018; import java.util.Scanner; /** * * @author GARCIA */ public class PROPUESTO018 { /** * @param args the command line arguments */ public static void main(String[] args) { int a,b; String X = ""; Scanner teclado=new Scanner(System.in); System.out.print("1er Número(A):"); a=teclado.nextInt(); System.out.print("2do Número(B):"); b=teclado.nextInt(); if(a>b){ X = "A es mayor que B"; }else{ if(b>a){ X = "B es Mayor que A"; } } if(a==b){ X = "A es igual a B"; } System.out.println(""); System.out.println("EL RESULTADO ES: " +X); } }