SlideShare a Scribd company logo
1 of 26
ESTRUCTURA SECUENCIAL
1°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema.nº2;
import java.io.*;
/**
*
* @author ERIKA */
public class ProblemaNº1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int n1,n2,s;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("numero 1:");
n1 = Integer.parseInt(in.readLine());
System.out.println("numero 2:");
n2 = Integer.parseInt(in.readLine());
s=n1+n2;
System.out.println("");
System.out.println("suma: " +s);
}
}
2°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema3;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema2 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException {
//varible
int n1,n2,c,r;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("numero 1:");
n1 = Integer.parseInt(in.readLine());
System.out.println("numero 2:");
n2 = Integer.parseInt(in.readLine());
//proceso
c=n1/n2;
r=n1%n2;
//salida
System.out.println("");
System.out.println("cociente: " +c);
System.out.println("residuo: " +r);
// TODO code application logic here
}
}
3°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema.pkg4;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema3 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException {
//variable
float vv,igv,pv;
//entrada
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("valor de venta:");
vv =Float.parseFloat(in.readLine());
//proceso
igv = vv *0.18f;
pv = vv+ igv;
//salida
System.out.println("");
System.out.println("igv: " +igv);
System.out.println("precio de venta: " +pv);
// TODO code application logic here
}
}
4°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema04;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA04 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
short n,r;
int a;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("a: ");
a=Integer.parseInt(in.readLine());
System.out.println("n: ");
n=Short.parseShort(in.readLine());
// TODO code application logic here
r=(short)Math.pow((double)a, (1/(double)n));
System.out.println("");
System.out.println("Radicación: "+r);
// TODO code application logic here
}
}
5°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema05;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA05 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
short n,r;
int a;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("a: ");
a=Integer.parseInt(in.readLine());
System.out.println("n: ");
n=Short.parseShort(in.readLine());
// TODO code application logic here
r=(short)Math.pow((double)a, (1/(double)n));
System.out.println("");
System.out.println("Radicación: "+r);
// TODO code application logic here
}
}
6°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema06;
import java.io.*;
/**
*
* @author RODRIGO
*/
public class PROBLEMA06 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
int n, ni, r;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número: ");
n=Integer.parseInt(in.readLine());
r=n%10;
n=n/10;
ni=r*10;
r=n%10;
n=n/10;
ni=(ni+r)*10;
r=n%10;
n=n/10;
ni=(ni+r)*10;
r=n%10;
n=n/10;
ni=(ni+r)*10;
ni=ni+n;
System.out.println("");
System.out.println("Inverso: " + ni);
}
}
7°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema07;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA07 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
int n,s;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número: ");
n=Integer.parseInt(in.readLine());
s=(n*(n+1))/2;
System.out.println("");
System.out.println("Suma: " + s);
}
}
8°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema8;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema8 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
float c, r, t, i, m;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Capital: ");
c=Float.parseFloat(in.readLine());
System.out.println("Tasa de interes: ");
r=Float.parseFloat(in.readLine());
System.out.println("Tiempo: ");
t=Float.parseFloat(in.readLine());
m=(float)(Math.pow((double)(1+r/100),(double)t))*c;
i=m-c;
System.out.println("");
System.out.println("Interes: " + i);
System.out.println("Monto: " + m);
}
}
9°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema9;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema9 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
// TODO code application logic here
//const float PI = 3.14159F;
final float PI=3.14159f;
float a,r;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Radio: ");
r=Float.parseFloat(in.readLine());
a=(float)(PI*(Math.pow((double)r, 2.0)));
System.out.println("");
System.out.println("Área: "+a);
}
}
10°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema10;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema10 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
final int HORA=3600;
final int MINUTO=60;
int t,h,m,s;
BufferedReader in =new BufferedReader(new InputStreamReader(System.in));
System.out.println("Tiempo en segundos: ");
t=Integer.parseInt(in.readLine());
h=t/HORA;
//t=t%HORA;
m=t/MINUTO;
s=t;
System.out.println("");
System.out.println("Horas: "+h);
System.out.println("Minutos: "+m);
System.out.println("Segundos: "+s);
// TODO code application logic here
}
}
11°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema11;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema11 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int a,b,n1,n2;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número1: ");
a=Integer.parseInt(in.readLine());
System.out.println("Número2: ");
b=Integer.parseInt(in.readLine());
n1=a+b;
n2=a-b;
System.out.println("");
System.out.println("Suma: " + n1);
System.out.println("Resta: " + n2);
// TODO code application logic here
}
}
12°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema012;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema012 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
int n;
String r = "";
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Número: ");
n=(int)Integer.parseInt(in.readLine());
if (n>0)
{
r="POSITIVO";
}
if (n<0)
{
r="NEGATIVO";
}
if(n==0)
{
r="NEUTRO";
}
System.out.println("");
System.out.println("Resultado: "+r);
}
}
13°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema013;
import java.util.Scanner;
/**
*
* @author ERIKA
*/
public class Problema013 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
char c;
//String r="";
System.out.println("Caracter");
Scanner teclado=new Scanner(System.in);
c=teclado.next().charAt(0);
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'
||c=='U'){
//r="es vocal";}
System.out.println("ES VOCAL");
} else{
//r="no es vocal"; }
System.out.println("NO ES VOCAL");
}//System.out.println("la letra ingresada "+r);
}
}
14°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema014;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema014 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int n;
String r;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Numero: ");
n=Integer.parseInt(in.readLine());
if(n%3==0 && n%5==0)
{
r="SÍ ES MÚLTIPLO DE 3 Y 5";
}
else
{
r="NO ES MÚLTIPLO DE 3 Y 5";
}
System.out.println("");
System.out.println("Resultado:" + r);
System.out.println();
}
}
15°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema015;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA015 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
// TODO code application logic here
int n;
String r;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Número: ");
n=Integer.parseInt(in.readLine());
if(n%2==0)
{
r= "PAR";
}
else
{
r= "IMPAR";
}
System.out.println("");
System.out.println("Resultado: " + r);
System.out.println();
}
}
16°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema016;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA016 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
int n1,n2,n3,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());
System.out.println("Número 3: ");
n3= Integer.parseInt(in.readLine());
if (n1>n2)
{
if(n1>n3)
{
m=n1;
}
else
{
m=n3;
}
}
else
{
if(n2>n3)
{
m=n2;
}
else
{
m=n3;
}
}
System.out.println("");
System.out.println("Mayor: " +m);
}
}
17°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema017;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA017 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
int n,r;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Número: ");
n = Integer.parseInt(in.readLine());
if (!(n%2==0))
{
r=n*2;
}
else
{
r=n*3;
}
System.out.println("");
System.out.println("Resultado: " + r);
System.out.println();
}
}
18°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema018;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA018 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
int n1, n2, n3, mayor, inter, menor;
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());
System.out.println("Número 3: ");
n3= Integer.parseInt(in.readLine());
if(n1 > n2 && n1 > n3)
{
mayor=n1;
}
else
{
if (n2 > n1 && n2> n3)
{
mayor=n2;
}
else
{
mayor=n3;
}
}
if(n1 < n2 && n1 < n3)
{
menor=n1;
}
else
{
if (n2 < n1 && n2 < n3)
{
menor=n2;
}
else
{
menor=n3;
}
}
inter=(n1 + n2 + n3)- (mayor + menor);
System.out.println("");
System.out.println("Mayor:" + mayor);
System.out.println("Inter:" + inter);
System.out.println("Menor:" + menor);
System.out.println();
}
}
19°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema019;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema019 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException{
final float D1=0.1F;
final float D2=0.2F;
final float IGV=0.18F;
float c,m_d, m_igv, p;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Consumo: ");
c=(float)Integer.parseInt(in.readLine());
if(c<=100)
{
m_d=c * D1;
}
else
{
m_d=c * D2;
}
m_igv=(c-m_d) * IGV;
p= c - m_d + m_igv;
System.out.println("");
System.out.println("Monto descuento: " + m_d);
System.out.println("Impuesto IGV: " + m_igv);
System.out.println("Importe a pagar: " + p);
System.out.println();
}
}
20°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema020;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema020 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException{
final float D1 = 0.1F;
final float D2 = 0.2F;
final float D3 = 0.3F;
final float IGV = 0.18F;
float c, m_d, m_igv, p;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Consumo: ");
c=(float)Integer.parseInt(in.readLine());
if(c>200)
{
m_d=c*D3;
}
else
{
if(c>100)
{
m_d=c*D2;
}
else
{
m_d=c*D1;
}
}
m_igv=(c-m_d) * IGV;
p=c-m_d+m_igv;
System.out.println("");
System.out.println("Monto descuento: " + m_d);
System.out.println("Impuesto IGV: " + m_igv);
System.out.println("Importe a pagar: " + p);
System.out.println();
}
}
21°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema021;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema021 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException{
int t;
String c;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Temperatura: ");
t = Integer.parseInt(in.readLine());
if (t<10)
{
c="FRIO";
}
else
{
if (t>9 && t<21)
{
c="NUBLADO";
}
else
{
if (t>=21 && t<=30)
{
c="CALOR";
}
else
{
c="TROPICAL";
}
}
}
System.out.println("");
System.out.println("Clima: " + c);
System.out.println();
}
}
22°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema022;
import java.util.Scanner;
/**
*
* @author ERIKA
*/
public class Problema022 {
/**
* @param args the command line arguments
*/
public static void main(String[] args){
Scanner in =new Scanner(System.in);
final float DESC_G = 0.15F;
final float DESC_A = 0.2F;
final float REC_G = 0.1F;
final float REC_A = 0.05F;
//variables
float mc, m, tp;
//char tc,fp;
String r ;
String tc;
String fp;
System.out.println("Monto de compra: ");
mc=in.nextFloat();
System.out.println("Tipo de cliente: ");
tc =in.next();
System.out.println("Forma de pago: ");
fp=in.next();
if(tc=="G")
{
if(fp=="C")
{
m = mc * DESC_G;
tp = mc - m;
r = "DESCUENTO 15%";
}
else
{
m = mc * REC_G;
tp = mc + m;
r = "RECARGO 10%";
}
}
else
{
if (fp=="C")
{
m = mc * DESC_A;
tp = mc - m;
r = "DESCUENTO 20%";
}
else
{
m= mc * REC_A;
tp = mc + m;
r = "RECARGO 5%";
}
}
System.out.println("");
System.out.println(r + ": "+m);
System.out.println("Total a pagar: " + tp);
System.out.println();
}
}
23°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema023;
import java.io.*;
/**
*
* @author ERIKA
*/
public class PROBLEMA023 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException{
float a,b,x;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("a: ");
a=Float.parseFloat(in.readLine());
System.out.println("b: ");
b=Float.parseFloat(in.readLine());
if(a!=0)
{
x=-b/a;
}
else
{
x=0;
}
System.out.println("");
System.out.println("x: " + x);
System.out.println();
}
}
24°
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema024;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema024 {
/**
* @param args the command line arguments
*/
public static void main(String[] args)throws IOException {
double a,b,c,d,x1,x2;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("a: ");
a=(double) Integer.parseInt(in.readLine());
System.out.println("b: ");
b=(double)Integer.parseInt(in.readLine());
System.out.println("c: ");
c=(double) Integer.parseInt(in.readLine());
d = Math.pow(b,2)-4*c;
if(a!=0 && d>=0)
{
x1 = (-b+Math.pow(d,(1.0/2)))/2*a;
x2 = (-b-Math.pow(d,(1.0/2)))/2*a;
}
else
{
x1 = 0;
x2 = 0;
}
System.out.println("");
System.out.println("x1: " + x1);
System.out.println("x2: " + x2);
System.out.println();
}
}
25°/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema0025;
import java.io.*;
/**
*
* @author ERIKA
*/
public class Problema0025 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int h,m,s;
BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Hora: ");
h= Integer.parseInt(in.readLine());
System.out.println("Minuto: ");
m=Integer.parseInt(in.readLine());
System.out.println("Segundo: ");
s= Integer.parseInt(in.readLine());
s+=1;
if (s==60)
{
s=0;
m+=1;
if(m==60)
{
m=0;
h+=1;
if(h==24)
{
h=0;
}
}
}
System.out.println("");
System.out.println("Hora: " + h);
System.out.println("Minuto: " + m);
System.out.println("Segundo: " + s);
System.out.println();
}
}

More Related Content

What's hot

12. Exception Handling
12. Exception Handling 12. Exception Handling
12. Exception Handling Intro C# Book
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good TestsTomek Kaczanowski
 
Java Programs
Java ProgramsJava Programs
Java Programsvvpadhu
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programmingdaotuan85
 
Rechecking SharpDevelop: Any New Bugs?
Rechecking SharpDevelop: Any New Bugs?Rechecking SharpDevelop: Any New Bugs?
Rechecking SharpDevelop: Any New Bugs?PVS-Studio
 
Anjalisoorej imca133 assignment
Anjalisoorej imca133 assignmentAnjalisoorej imca133 assignment
Anjalisoorej imca133 assignmentAnjaliSoorej
 
12. Java Exceptions and error handling
12. Java Exceptions and error handling12. Java Exceptions and error handling
12. Java Exceptions and error handlingIntro C# Book
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaaBagusBudi11
 

What's hot (16)

12. Exception Handling
12. Exception Handling 12. Exception Handling
12. Exception Handling
 
FunctionalInterfaces
FunctionalInterfacesFunctionalInterfaces
FunctionalInterfaces
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
Comp102 lec 5.1
Comp102   lec 5.1Comp102   lec 5.1
Comp102 lec 5.1
 
Unit iii
Unit iiiUnit iii
Unit iii
 
Exception
ExceptionException
Exception
 
Mock your way with Mockito
Mock your way with MockitoMock your way with Mockito
Mock your way with Mockito
 
Java Programs
Java ProgramsJava Programs
Java Programs
 
Applet
AppletApplet
Applet
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programming
 
Rechecking SharpDevelop: Any New Bugs?
Rechecking SharpDevelop: Any New Bugs?Rechecking SharpDevelop: Any New Bugs?
Rechecking SharpDevelop: Any New Bugs?
 
Anjalisoorej imca133 assignment
Anjalisoorej imca133 assignmentAnjalisoorej imca133 assignment
Anjalisoorej imca133 assignment
 
Unit testing concurrent code
Unit testing concurrent codeUnit testing concurrent code
Unit testing concurrent code
 
12. Java Exceptions and error handling
12. Java Exceptions and error handling12. Java Exceptions and error handling
12. Java Exceptions and error handling
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
Test final jav_aaa
Test final jav_aaaTest final jav_aaa
Test final jav_aaa
 

Viewers also liked

Young C. Mcikechi ResumeMcIAbIBest
Young C. Mcikechi ResumeMcIAbIBestYoung C. Mcikechi ResumeMcIAbIBest
Young C. Mcikechi ResumeMcIAbIBestYoung McIkechi
 
Question 2 & 3 of evaluation
Question 2 & 3 of evaluation Question 2 & 3 of evaluation
Question 2 & 3 of evaluation idil moali
 
Unit 5 research project
Unit 5 research projectUnit 5 research project
Unit 5 research projectIain Lynch
 
الفعاليات مهنة المرأة
الفعاليات مهنة المرأةالفعاليات مهنة المرأة
الفعاليات مهنة المرأةAbdullah Alqhahtani
 
E-Learning & Information Security
E-Learning & Information SecurityE-Learning & Information Security
E-Learning & Information SecurityTaghreed Alrehaili
 
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolah
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolahKb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolah
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolahpjj_kemenkes
 
SCREENING TUBES
SCREENING TUBESSCREENING TUBES
SCREENING TUBESAmr Rajab
 

Viewers also liked (12)

"Cuentos en una botella"
"Cuentos en una botella""Cuentos en una botella"
"Cuentos en una botella"
 
Young C. Mcikechi ResumeMcIAbIBest
Young C. Mcikechi ResumeMcIAbIBestYoung C. Mcikechi ResumeMcIAbIBest
Young C. Mcikechi ResumeMcIAbIBest
 
Problemas propuestos
Problemas propuestosProblemas propuestos
Problemas propuestos
 
Question 2 & 3 of evaluation
Question 2 & 3 of evaluation Question 2 & 3 of evaluation
Question 2 & 3 of evaluation
 
Unit 5 research project
Unit 5 research projectUnit 5 research project
Unit 5 research project
 
Ramya K(1311069)
Ramya K(1311069)Ramya K(1311069)
Ramya K(1311069)
 
MHR Level 5 NVQ
MHR Level 5 NVQMHR Level 5 NVQ
MHR Level 5 NVQ
 
Justice
JusticeJustice
Justice
 
الفعاليات مهنة المرأة
الفعاليات مهنة المرأةالفعاليات مهنة المرأة
الفعاليات مهنة المرأة
 
E-Learning & Information Security
E-Learning & Information SecurityE-Learning & Information Security
E-Learning & Information Security
 
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolah
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolahKb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolah
Kb2 kebutuhan dasar neonatus, bayi, balita dan anak pra sekolah
 
SCREENING TUBES
SCREENING TUBESSCREENING TUBES
SCREENING TUBES
 

Similar to ESTRUCTURA SECUENCIAL Java problems

java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1Ankit Gupta
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerAiman Hud
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2Ankit Gupta
 
the code below is a recommendation system application to suggest a s.pdf
the code below is a recommendation system application to suggest a s.pdfthe code below is a recommendation system application to suggest a s.pdf
the code below is a recommendation system application to suggest a s.pdfrajatchugh13
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfmayorothenguyenhob69
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaanwalia Shaan
 
Frequency .java Word frequency counter package frequ.pdf
Frequency .java  Word frequency counter  package frequ.pdfFrequency .java  Word frequency counter  package frequ.pdf
Frequency .java Word frequency counter package frequ.pdfarshiartpalace
 
- the modification will be done in Main class- first, asks the use.pdf
- the modification will be done in Main class- first, asks the use.pdf- the modification will be done in Main class- first, asks the use.pdf
- the modification will be done in Main class- first, asks the use.pdfhanumanparsadhsr
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manualsameer farooq
 
Cambio de bases
Cambio de basesCambio de bases
Cambio de basesalcon2015
 
Reading and writting
Reading and writtingReading and writting
Reading and writtingandreeamolnar
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingPathomchon Sriwilairit
 

Similar to ESTRUCTURA SECUENCIAL Java problems (20)

Base de-datos
Base de-datosBase de-datos
Base de-datos
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
java program assigment -2
java program assigment -2java program assigment -2
java program assigment -2
 
the code below is a recommendation system application to suggest a s.pdf
the code below is a recommendation system application to suggest a s.pdfthe code below is a recommendation system application to suggest a s.pdf
the code below is a recommendation system application to suggest a s.pdf
 
Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
 
Java Programming Assignment
Java Programming AssignmentJava Programming Assignment
Java Programming Assignment
 
Review Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdfReview Questions for Exam 10182016 1. public class .pdf
Review Questions for Exam 10182016 1. public class .pdf
 
Presentation1 computer shaan
Presentation1 computer shaanPresentation1 computer shaan
Presentation1 computer shaan
 
5 Rmi Print
5  Rmi Print5  Rmi Print
5 Rmi Print
 
Java file
Java fileJava file
Java file
 
Java file
Java fileJava file
Java file
 
Frequency .java Word frequency counter package frequ.pdf
Frequency .java  Word frequency counter  package frequ.pdfFrequency .java  Word frequency counter  package frequ.pdf
Frequency .java Word frequency counter package frequ.pdf
 
srgoc
srgocsrgoc
srgoc
 
- the modification will be done in Main class- first, asks the use.pdf
- the modification will be done in Main class- first, asks the use.pdf- the modification will be done in Main class- first, asks the use.pdf
- the modification will be done in Main class- first, asks the use.pdf
 
Introduction to Java Programming Part 2
Introduction to Java Programming Part 2Introduction to Java Programming Part 2
Introduction to Java Programming Part 2
 
Java programming lab manual
Java programming lab manualJava programming lab manual
Java programming lab manual
 
Cambio de bases
Cambio de basesCambio de bases
Cambio de bases
 
Reading and writting
Reading and writtingReading and writting
Reading and writting
 
JPC#8 Introduction to Java Programming
JPC#8 Introduction to Java ProgrammingJPC#8 Introduction to Java Programming
JPC#8 Introduction to Java Programming
 

More from Erika Susan Villcas

More from Erika Susan Villcas (12)

Problemas propuestos
Problemas propuestosProblemas propuestos
Problemas propuestos
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas propuestos
Problemas propuestosProblemas propuestos
Problemas propuestos
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Resumen de los capitulos i, ii, iii del libro kendall & kendall
Resumen de los capitulos i, ii, iii del libro kendall & kendallResumen de los capitulos i, ii, iii del libro kendall & kendall
Resumen de los capitulos i, ii, iii del libro kendall & kendall
 
Ejercicios condicionales
Ejercicios condicionalesEjercicios condicionales
Ejercicios condicionales
 
Erika villlcas
Erika villlcasErika villlcas
Erika villlcas
 
Algoritmos condicionales
Algoritmos condicionalesAlgoritmos condicionales
Algoritmos condicionales
 
Algoritmos secuenciales
Algoritmos secuencialesAlgoritmos secuenciales
Algoritmos secuenciales
 
Diseño de boleta, factura, guía de remisión,recibo por honorario,curriculum
Diseño de boleta, factura, guía de remisión,recibo por honorario,curriculumDiseño de boleta, factura, guía de remisión,recibo por honorario,curriculum
Diseño de boleta, factura, guía de remisión,recibo por honorario,curriculum
 

Recently uploaded

Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spiritegoetzinger
 
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...makika9823
 
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130  Available With RoomVIP Kolkata Call Girl Serampore 👉 8250192130  Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Roomdivyansh0kumar0
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
Quarter 4- Module 3 Principles of Marketing
Quarter 4- Module 3 Principles of MarketingQuarter 4- Module 3 Principles of Marketing
Quarter 4- Module 3 Principles of MarketingMaristelaRamos12
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfGale Pooley
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...shivangimorya083
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services  9892124323 | ₹,4500 With Room Free DeliveryMalad Call Girl in Services  9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free DeliveryPooja Nehwal
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Pooja Nehwal
 
How Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingHow Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingAggregage
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxanshikagoel52
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfAdnet Communications
 

Recently uploaded (20)

Instant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School SpiritInstant Issue Debit Cards - High School Spirit
Instant Issue Debit Cards - High School Spirit
 
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
 
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130  Available With RoomVIP Kolkata Call Girl Serampore 👉 8250192130  Available With Room
VIP Kolkata Call Girl Serampore 👉 8250192130 Available With Room
 
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANIKA) Budhwar Peth Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
Quarter 4- Module 3 Principles of Marketing
Quarter 4- Module 3 Principles of MarketingQuarter 4- Module 3 Principles of Marketing
Quarter 4- Module 3 Principles of Marketing
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdf
 
Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024Commercial Bank Economic Capsule - April 2024
Commercial Bank Economic Capsule - April 2024
 
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services  9892124323 | ₹,4500 With Room Free DeliveryMalad Call Girl in Services  9892124323 | ₹,4500 With Room Free Delivery
Malad Call Girl in Services 9892124323 | ₹,4500 With Room Free Delivery
 
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
Independent Call Girl Number in Kurla Mumbai📲 Pooja Nehwal 9892124323 💞 Full ...
 
How Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingHow Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of Reporting
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
Dividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptxDividend Policy and Dividend Decision Theories.pptx
Dividend Policy and Dividend Decision Theories.pptx
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdf
 

ESTRUCTURA SECUENCIAL Java problems

  • 1. ESTRUCTURA SECUENCIAL 1° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema.nº2; import java.io.*; /** * * @author ERIKA */ public class ProblemaNº1 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int n1,n2,s; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("numero 1:"); n1 = Integer.parseInt(in.readLine()); System.out.println("numero 2:"); n2 = Integer.parseInt(in.readLine()); s=n1+n2; System.out.println(""); System.out.println("suma: " +s); } }
  • 2. 2° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema3; import java.io.*; /** * * @author ERIKA */ public class Problema2 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException { //varible int n1,n2,c,r; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("numero 1:"); n1 = Integer.parseInt(in.readLine()); System.out.println("numero 2:"); n2 = Integer.parseInt(in.readLine()); //proceso c=n1/n2; r=n1%n2; //salida System.out.println(""); System.out.println("cociente: " +c); System.out.println("residuo: " +r); // TODO code application logic here } }
  • 3. 3° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema.pkg4; import java.io.*; /** * * @author ERIKA */ public class Problema3 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException { //variable float vv,igv,pv; //entrada BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("valor de venta:"); vv =Float.parseFloat(in.readLine()); //proceso igv = vv *0.18f; pv = vv+ igv; //salida System.out.println(""); System.out.println("igv: " +igv); System.out.println("precio de venta: " +pv); // TODO code application logic here } }
  • 4. 4° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema04; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA04 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { short n,r; int a; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=Integer.parseInt(in.readLine()); System.out.println("n: "); n=Short.parseShort(in.readLine()); // TODO code application logic here r=(short)Math.pow((double)a, (1/(double)n)); System.out.println(""); System.out.println("Radicación: "+r); // TODO code application logic here } }
  • 5. 5° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema05; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA05 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { short n,r; int a; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=Integer.parseInt(in.readLine()); System.out.println("n: "); n=Short.parseShort(in.readLine()); // TODO code application logic here r=(short)Math.pow((double)a, (1/(double)n)); System.out.println(""); System.out.println("Radicación: "+r); // TODO code application logic here } }
  • 6. 6° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema06; import java.io.*; /** * * @author RODRIGO */ public class PROBLEMA06 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here int n, ni, r; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número: "); n=Integer.parseInt(in.readLine()); r=n%10; n=n/10; ni=r*10; r=n%10; n=n/10; ni=(ni+r)*10; r=n%10; n=n/10; ni=(ni+r)*10; r=n%10; n=n/10; ni=(ni+r)*10; ni=ni+n; System.out.println(""); System.out.println("Inverso: " + ni); } }
  • 7. 7° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema07; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA07 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here int n,s; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número: "); n=Integer.parseInt(in.readLine()); s=(n*(n+1))/2; System.out.println(""); System.out.println("Suma: " + s); } }
  • 8. 8° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema8; import java.io.*; /** * * @author ERIKA */ public class Problema8 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { float c, r, t, i, m; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Capital: "); c=Float.parseFloat(in.readLine()); System.out.println("Tasa de interes: "); r=Float.parseFloat(in.readLine()); System.out.println("Tiempo: "); t=Float.parseFloat(in.readLine()); m=(float)(Math.pow((double)(1+r/100),(double)t))*c; i=m-c; System.out.println(""); System.out.println("Interes: " + i); System.out.println("Monto: " + m); } }
  • 9. 9° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema9; import java.io.*; /** * * @author ERIKA */ public class Problema9 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { // TODO code application logic here //const float PI = 3.14159F; final float PI=3.14159f; float a,r; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Radio: "); r=Float.parseFloat(in.readLine()); a=(float)(PI*(Math.pow((double)r, 2.0))); System.out.println(""); System.out.println("Área: "+a); } }
  • 10. 10° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema10; import java.io.*; /** * * @author ERIKA */ public class Problema10 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { final int HORA=3600; final int MINUTO=60; int t,h,m,s; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Tiempo en segundos: "); t=Integer.parseInt(in.readLine()); h=t/HORA; //t=t%HORA; m=t/MINUTO; s=t; System.out.println(""); System.out.println("Horas: "+h); System.out.println("Minutos: "+m); System.out.println("Segundos: "+s); // TODO code application logic here } }
  • 11. 11° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema11; import java.io.*; /** * * @author ERIKA */ public class Problema11 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int a,b,n1,n2; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número1: "); a=Integer.parseInt(in.readLine()); System.out.println("Número2: "); b=Integer.parseInt(in.readLine()); n1=a+b; n2=a-b; System.out.println(""); System.out.println("Suma: " + n1); System.out.println("Resta: " + n2); // TODO code application logic here } }
  • 12. 12° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema012; import java.io.*; /** * * @author ERIKA */ public class Problema012 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ int n; String r = ""; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número: "); n=(int)Integer.parseInt(in.readLine()); if (n>0) { r="POSITIVO"; } if (n<0) { r="NEGATIVO"; } if(n==0) { r="NEUTRO"; } System.out.println(""); System.out.println("Resultado: "+r); } }
  • 13. 13° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema013; import java.util.Scanner; /** * * @author ERIKA */ public class Problema013 { /** * @param args the command line arguments */ public static void main(String[] args) { char c; //String r=""; System.out.println("Caracter"); Scanner teclado=new Scanner(System.in); c=teclado.next().charAt(0); if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O' ||c=='U'){ //r="es vocal";} System.out.println("ES VOCAL"); } else{ //r="no es vocal"; } System.out.println("NO ES VOCAL"); }//System.out.println("la letra ingresada "+r); } }
  • 14. 14° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema014; import java.io.*; /** * * @author ERIKA */ public class Problema014 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int n; String r; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Numero: "); n=Integer.parseInt(in.readLine()); if(n%3==0 && n%5==0) { r="SÍ ES MÚLTIPLO DE 3 Y 5"; } else { r="NO ES MÚLTIPLO DE 3 Y 5"; } System.out.println(""); System.out.println("Resultado:" + r); System.out.println(); } }
  • 15. 15° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema015; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA015 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ // TODO code application logic here int n; String r; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número: "); n=Integer.parseInt(in.readLine()); if(n%2==0) { r= "PAR"; } else { r= "IMPAR"; } System.out.println(""); System.out.println("Resultado: " + r); System.out.println(); } }
  • 16. 16° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema016; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA016 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ int n1,n2,n3,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()); System.out.println("Número 3: "); n3= Integer.parseInt(in.readLine()); if (n1>n2) { if(n1>n3) { m=n1; } else { m=n3; } } else { if(n2>n3) { m=n2; } else { m=n3; } } System.out.println(""); System.out.println("Mayor: " +m); } }
  • 17. 17° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema017; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA017 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ int n,r; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número: "); n = Integer.parseInt(in.readLine()); if (!(n%2==0)) { r=n*2; } else { r=n*3; } System.out.println(""); System.out.println("Resultado: " + r); System.out.println(); } }
  • 18. 18° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema018; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA018 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ int n1, n2, n3, mayor, inter, menor; 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()); System.out.println("Número 3: "); n3= Integer.parseInt(in.readLine()); if(n1 > n2 && n1 > n3) { mayor=n1; } else { if (n2 > n1 && n2> n3) { mayor=n2; } else { mayor=n3; } } if(n1 < n2 && n1 < n3) { menor=n1; } else { if (n2 < n1 && n2 < n3) { menor=n2; } else { menor=n3; } } inter=(n1 + n2 + n3)- (mayor + menor);
  • 19. System.out.println(""); System.out.println("Mayor:" + mayor); System.out.println("Inter:" + inter); System.out.println("Menor:" + menor); System.out.println(); } } 19° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema019; import java.io.*; /** * * @author ERIKA */ public class Problema019 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException{ final float D1=0.1F; final float D2=0.2F; final float IGV=0.18F; float c,m_d, m_igv, p; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Consumo: "); c=(float)Integer.parseInt(in.readLine()); if(c<=100) { m_d=c * D1; } else { m_d=c * D2; } m_igv=(c-m_d) * IGV; p= c - m_d + m_igv; System.out.println(""); System.out.println("Monto descuento: " + m_d); System.out.println("Impuesto IGV: " + m_igv); System.out.println("Importe a pagar: " + p); System.out.println(); } }
  • 20. 20° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema020; import java.io.*; /** * * @author ERIKA */ public class Problema020 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException{ final float D1 = 0.1F; final float D2 = 0.2F; final float D3 = 0.3F; final float IGV = 0.18F; float c, m_d, m_igv, p; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Consumo: "); c=(float)Integer.parseInt(in.readLine()); if(c>200) { m_d=c*D3; } else { if(c>100) { m_d=c*D2; } else { m_d=c*D1; } } m_igv=(c-m_d) * IGV; p=c-m_d+m_igv; System.out.println(""); System.out.println("Monto descuento: " + m_d); System.out.println("Impuesto IGV: " + m_igv); System.out.println("Importe a pagar: " + p); System.out.println(); } }
  • 21. 21° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema021; import java.io.*; /** * * @author ERIKA */ public class Problema021 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException{ int t; String c; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Temperatura: "); t = Integer.parseInt(in.readLine()); if (t<10) { c="FRIO"; } else { if (t>9 && t<21) { c="NUBLADO"; } else { if (t>=21 && t<=30) { c="CALOR"; } else { c="TROPICAL"; } } } System.out.println(""); System.out.println("Clima: " + c); System.out.println(); } }
  • 22. 22° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema022; import java.util.Scanner; /** * * @author ERIKA */ public class Problema022 { /** * @param args the command line arguments */ public static void main(String[] args){ Scanner in =new Scanner(System.in); final float DESC_G = 0.15F; final float DESC_A = 0.2F; final float REC_G = 0.1F; final float REC_A = 0.05F; //variables float mc, m, tp; //char tc,fp; String r ; String tc; String fp; System.out.println("Monto de compra: "); mc=in.nextFloat(); System.out.println("Tipo de cliente: "); tc =in.next(); System.out.println("Forma de pago: "); fp=in.next(); if(tc=="G") { if(fp=="C") { m = mc * DESC_G; tp = mc - m; r = "DESCUENTO 15%"; } else { m = mc * REC_G; tp = mc + m; r = "RECARGO 10%"; } } else { if (fp=="C")
  • 23. { m = mc * DESC_A; tp = mc - m; r = "DESCUENTO 20%"; } else { m= mc * REC_A; tp = mc + m; r = "RECARGO 5%"; } } System.out.println(""); System.out.println(r + ": "+m); System.out.println("Total a pagar: " + tp); System.out.println(); } }
  • 24. 23° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema023; import java.io.*; /** * * @author ERIKA */ public class PROBLEMA023 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException{ float a,b,x; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=Float.parseFloat(in.readLine()); System.out.println("b: "); b=Float.parseFloat(in.readLine()); if(a!=0) { x=-b/a; } else { x=0; } System.out.println(""); System.out.println("x: " + x); System.out.println(); } }
  • 25. 24° /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema024; import java.io.*; /** * * @author ERIKA */ public class Problema024 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException { double a,b,c,d,x1,x2; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=(double) Integer.parseInt(in.readLine()); System.out.println("b: "); b=(double)Integer.parseInt(in.readLine()); System.out.println("c: "); c=(double) Integer.parseInt(in.readLine()); d = Math.pow(b,2)-4*c; if(a!=0 && d>=0) { x1 = (-b+Math.pow(d,(1.0/2)))/2*a; x2 = (-b-Math.pow(d,(1.0/2)))/2*a; } else { x1 = 0; x2 = 0; } System.out.println(""); System.out.println("x1: " + x1); System.out.println("x2: " + x2); System.out.println(); } }
  • 26. 25°/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema0025; import java.io.*; /** * * @author ERIKA */ public class Problema0025 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int h,m,s; BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Hora: "); h= Integer.parseInt(in.readLine()); System.out.println("Minuto: "); m=Integer.parseInt(in.readLine()); System.out.println("Segundo: "); s= Integer.parseInt(in.readLine()); s+=1; if (s==60) { s=0; m+=1; if(m==60) { m=0; h+=1; if(h==24) { h=0; } } } System.out.println(""); System.out.println("Hora: " + h); System.out.println("Minuto: " + m); System.out.println("Segundo: " + s); System.out.println(); } }