SlideShare a Scribd company logo
1 of 22
Problema1
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema.nº1;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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);
}
}
Problema 2
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema2;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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
}
}
Problema3
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema.pkg3;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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
}
}
Problema4
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema004;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema004 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
short a,n;
int p;
BufferedReader in =new BufferedReader(new
InputStreamReader(System.in));
System.out.println("a: ");
a=Short.parseShort(in.readLine());
System.out.println("n: ");
n=Short.parseShort(in.readLine());
// TODO code application logic here
p=(int)Math.pow((double)a, (double)n);
System.out.println("");
System.out.println("Potencia: "+p);
}
}
Problema5
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema5;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class PROBLEMA5 {
/**
* @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
}
}
Problema6
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema6;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class PROBLEMA6 {
/**
* @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);
}
}
Problema7
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema07;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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);
}
}
Problema8
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema8;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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);
}
}
Problema9
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema9;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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);
}
}
Problema10
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema10;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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
}
}
Problema11
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema11;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema11 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
int n1, n2, m = 0;
BufferedReader in=new BufferedReader(new
InputStreamReader(System.in));
System.out.println("Número 1: ");
n1=(int) Integer.parseInt(in.readLine());
System.out.println("Número 2: ");
n2=(int) Integer.parseInt(in.readLine());
if(n1>n2)
m= n1;
if(n2>n1)
m= n2;
System.out.println("");
System.out.println("Mayor:"+m);
Problema12
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema12;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema12 {
/**
* @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);
}
}
Problema13
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema13;
import java.util.Scanner;
/**
*
* @author RositaRoblesArmas
*/
public class Problema13 {
/**
* @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);
}
}
Problema14
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema014;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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();
}
}
Problema15
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema015;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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();
}
}
Problema16
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema16;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class PROBLEMA16 {
/**
* @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);
}
}
Problema17
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema017;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
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();
}
}
Problema18
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema18;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class PROBLEMA18 {
/**
* @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();
}
}
Problema19
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema19;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema19 {
/**
* @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();
}
}
Problema20
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema20;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema20 {
/**
* @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();
}
}
Problema21
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema21;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema21 {
/**
* @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();
}
}
Problema22
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema22;
import java.util.Scanner;
/**
*
* @author RositaRoblesArmas
*/
public class Problema22 {
/**
* @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();
}
}
Problema23
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema23;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class PROBLEMA23 {
/**
* @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();
}
}
Problema24
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema24;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema24 {
/**
* @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();
}
}
Problema25
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package problema25;
import java.io.*;
/**
*
* @author RositaRoblesArmas
*/
public class Problema25 {
/**
* @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

What's hot (16)

JUnit & Mockito, first steps
JUnit & Mockito, first stepsJUnit & Mockito, first steps
JUnit & Mockito, first steps
 
Programs of java
Programs of javaPrograms of java
Programs of java
 
Loop
LoopLoop
Loop
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
Comp102 lec 5.1
Comp102   lec 5.1Comp102   lec 5.1
Comp102 lec 5.1
 
Mockito intro
Mockito introMockito intro
Mockito intro
 
Hoisting Nested Functions
Hoisting Nested FunctionsHoisting Nested Functions
Hoisting Nested Functions
 
JMockit Framework Overview
JMockit Framework OverviewJMockit Framework Overview
JMockit Framework Overview
 
ScalaFlavor4J
ScalaFlavor4JScalaFlavor4J
ScalaFlavor4J
 
Hoisting Nested Functions
Hoisting Nested Functions Hoisting Nested Functions
Hoisting Nested Functions
 
Memories of Bug Fixes
Memories of Bug FixesMemories of Bug Fixes
Memories of Bug Fixes
 
FunctionalInterfaces
FunctionalInterfacesFunctionalInterfaces
FunctionalInterfaces
 
Advanced junit and mockito
Advanced junit and mockitoAdvanced junit and mockito
Advanced junit and mockito
 
JUnit
JUnitJUnit
JUnit
 
JUnit 5
JUnit 5JUnit 5
JUnit 5
 
Unit testing concurrent code
Unit testing concurrent codeUnit testing concurrent code
Unit testing concurrent code
 

Viewers also liked

Connecting sentences and but
Connecting sentences and butConnecting sentences and but
Connecting sentences and butLevilei
 
Expo pensamiento c
Expo pensamiento cExpo pensamiento c
Expo pensamiento cSugey Laguna
 
Joomla架站趣 1031219
Joomla架站趣 1031219Joomla架站趣 1031219
Joomla架站趣 1031219jidca2004
 
presentaciònalbertosalgadomarin
presentaciònalbertosalgadomarinpresentaciònalbertosalgadomarin
presentaciònalbertosalgadomarinalbertsalga95
 
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...rmtjaycees
 
Visita a rodaquimicos ltda
Visita a rodaquimicos ltda Visita a rodaquimicos ltda
Visita a rodaquimicos ltda camilo9704
 
Memanfaatkan data riset pemasaran
Memanfaatkan data riset pemasaranMemanfaatkan data riset pemasaran
Memanfaatkan data riset pemasaranZainur Amiruddin
 
What? Yet more rights for consumers? Seminar Presentation
What?  Yet more rights for consumers? Seminar PresentationWhat?  Yet more rights for consumers? Seminar Presentation
What? Yet more rights for consumers? Seminar PresentationPat Coyle
 
UTS_membuat Cover,Daftar Isi dan Daftar Pustaka
UTS_membuat Cover,Daftar Isi dan Daftar PustakaUTS_membuat Cover,Daftar Isi dan Daftar Pustaka
UTS_membuat Cover,Daftar Isi dan Daftar Pustakatinanurvia
 
New Moon Website Analysis
New Moon Website AnalysisNew Moon Website Analysis
New Moon Website Analysisguest8c8401b
 
Catalog: title search
Catalog: title searchCatalog: title search
Catalog: title searchElementalPea
 
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...Futuramb
 

Viewers also liked (18)

Connecting sentences and but
Connecting sentences and butConnecting sentences and but
Connecting sentences and but
 
Expo pensamiento c
Expo pensamiento cExpo pensamiento c
Expo pensamiento c
 
Joomla架站趣 1031219
Joomla架站趣 1031219Joomla架站趣 1031219
Joomla架站趣 1031219
 
presentaciònalbertosalgadomarin
presentaciònalbertosalgadomarinpresentaciònalbertosalgadomarin
presentaciònalbertosalgadomarin
 
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...
Nash Community College BDF Program Presentation - Local Economic Outlook Lunc...
 
Visita a rodaquimicos ltda
Visita a rodaquimicos ltda Visita a rodaquimicos ltda
Visita a rodaquimicos ltda
 
Memanfaatkan data riset pemasaran
Memanfaatkan data riset pemasaranMemanfaatkan data riset pemasaran
Memanfaatkan data riset pemasaran
 
Comercio justo doc
Comercio justo docComercio justo doc
Comercio justo doc
 
What? Yet more rights for consumers? Seminar Presentation
What?  Yet more rights for consumers? Seminar PresentationWhat?  Yet more rights for consumers? Seminar Presentation
What? Yet more rights for consumers? Seminar Presentation
 
UTS_membuat Cover,Daftar Isi dan Daftar Pustaka
UTS_membuat Cover,Daftar Isi dan Daftar PustakaUTS_membuat Cover,Daftar Isi dan Daftar Pustaka
UTS_membuat Cover,Daftar Isi dan Daftar Pustaka
 
ชีววิทยา 41
ชีววิทยา  41ชีววิทยา  41
ชีววิทยา 41
 
Sugar Shack W2G
Sugar Shack W2GSugar Shack W2G
Sugar Shack W2G
 
New Moon Website Analysis
New Moon Website AnalysisNew Moon Website Analysis
New Moon Website Analysis
 
Catalog: title search
Catalog: title searchCatalog: title search
Catalog: title search
 
Seminario 9
Seminario 9Seminario 9
Seminario 9
 
St. Jordi
St. JordiSt. Jordi
St. Jordi
 
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...
Gestão da atividade de jardinagem - resíduos e águas - Curso de Formação E-le...
 
Guitar instruction
Guitar instructionGuitar instruction
Guitar instruction
 

Similar to Trabajo

KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerAiman Hud
 
Introduction to the Stat-JR software package
Introduction to the Stat-JR software packageIntroduction to the Stat-JR software package
Introduction to the Stat-JR software packageUniversity of Southampton
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1Ankit Gupta
 
Clean code _v2003
 Clean code _v2003 Clean code _v2003
Clean code _v2003R696
 
Company Call System
Company Call SystemCompany Call System
Company Call SystemTyler Mooney
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3Dillon Lee
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimizationadil raja
 
Modify this code to use multiple threads with the same data1.Modif.pdf
Modify this code to use multiple threads with the same data1.Modif.pdfModify this code to use multiple threads with the same data1.Modif.pdf
Modify this code to use multiple threads with the same data1.Modif.pdfmallik3000
 
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdf
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdfpublic static ArrayListInteger doArrayListInsertAtMedian(int nu.pdf
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdfarihanthtoysandgifts
 

Similar to Trabajo (20)

Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Problemas secuenciales.
Problemas secuenciales.Problemas secuenciales.
Problemas secuenciales.
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
 
Functional Programming
Functional ProgrammingFunctional Programming
Functional Programming
 
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian KomputerKOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
KOLEJ KOMUNITI - Sijil Aplikasi Perisian Komputer
 
srgoc
srgocsrgoc
srgoc
 
Introduction to the Stat-JR software package
Introduction to the Stat-JR software packageIntroduction to the Stat-JR software package
Introduction to the Stat-JR software package
 
Java Programming Assignment
Java Programming AssignmentJava Programming Assignment
Java Programming Assignment
 
Maze
MazeMaze
Maze
 
java program assigment -1
java program assigment -1java program assigment -1
java program assigment -1
 
SOLID Java Code
SOLID Java CodeSOLID Java Code
SOLID Java Code
 
Clean code _v2003
 Clean code _v2003 Clean code _v2003
Clean code _v2003
 
Company Call System
Company Call SystemCompany Call System
Company Call System
 
Integration Project Inspection 3
Integration Project Inspection 3Integration Project Inspection 3
Integration Project Inspection 3
 
Java programs
Java programsJava programs
Java programs
 
Grammatical Optimization
Grammatical OptimizationGrammatical Optimization
Grammatical Optimization
 
Modify this code to use multiple threads with the same data1.Modif.pdf
Modify this code to use multiple threads with the same data1.Modif.pdfModify this code to use multiple threads with the same data1.Modif.pdf
Modify this code to use multiple threads with the same data1.Modif.pdf
 
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdf
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdfpublic static ArrayListInteger doArrayListInsertAtMedian(int nu.pdf
public static ArrayListInteger doArrayListInsertAtMedian(int nu.pdf
 

Recently uploaded

government_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfgovernment_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfshaunmashale756
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignHenry Tapper
 
Andheri Call Girls In 9825968104 Mumbai Hot Models
Andheri Call Girls In 9825968104 Mumbai Hot ModelsAndheri Call Girls In 9825968104 Mumbai Hot Models
Andheri Call Girls In 9825968104 Mumbai Hot Modelshematsharma006
 
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With RoomVIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Roomdivyansh0kumar0
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...Suhani Kapoor
 
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
 
Stock Market Brief Deck for "this does not happen often".pdf
Stock Market Brief Deck for "this does not happen often".pdfStock Market Brief Deck for "this does not happen often".pdf
Stock Market Brief Deck for "this does not happen often".pdfMichael Silva
 
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfBPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfHenry Tapper
 
SBP-Market-Operations and market managment
SBP-Market-Operations and market managmentSBP-Market-Operations and market managment
SBP-Market-Operations and market managmentfactical
 
Financial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and DisadvantagesFinancial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and Disadvantagesjayjaymabutot13
 
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesMulki Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 
Attachment Of Assets......................
Attachment Of Assets......................Attachment Of Assets......................
Attachment Of Assets......................AmanBajaj36
 
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
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
 
Stock Market Brief Deck for 4/24/24 .pdf
Stock Market Brief Deck for 4/24/24 .pdfStock Market Brief Deck for 4/24/24 .pdf
Stock Market Brief Deck for 4/24/24 .pdfMichael Silva
 
Classical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithClassical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithAdamYassin2
 
Financial institutions facilitate financing, economic transactions, issue fun...
Financial institutions facilitate financing, economic transactions, issue fun...Financial institutions facilitate financing, economic transactions, issue fun...
Financial institutions facilitate financing, economic transactions, issue fun...Avanish Goel
 
Vp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppVp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppmiss dipika
 
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
 
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
 

Recently uploaded (20)

government_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdfgovernment_intervention_in_business_ownership[1].pdf
government_intervention_in_business_ownership[1].pdf
 
Log your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaignLog your LOA pain with Pension Lab's brilliant campaign
Log your LOA pain with Pension Lab's brilliant campaign
 
Andheri Call Girls In 9825968104 Mumbai Hot Models
Andheri Call Girls In 9825968104 Mumbai Hot ModelsAndheri Call Girls In 9825968104 Mumbai Hot Models
Andheri Call Girls In 9825968104 Mumbai Hot Models
 
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With RoomVIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
 
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
VIP Call Girls LB Nagar ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With Room...
 
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
 
Stock Market Brief Deck for "this does not happen often".pdf
Stock Market Brief Deck for "this does not happen often".pdfStock Market Brief Deck for "this does not happen often".pdf
Stock Market Brief Deck for "this does not happen often".pdf
 
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdfBPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
BPPG response - Options for Defined Benefit schemes - 19Apr24.pdf
 
SBP-Market-Operations and market managment
SBP-Market-Operations and market managmentSBP-Market-Operations and market managment
SBP-Market-Operations and market managment
 
Financial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and DisadvantagesFinancial Leverage Definition, Advantages, and Disadvantages
Financial Leverage Definition, Advantages, and Disadvantages
 
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesMulki Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Mulki Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 
Attachment Of Assets......................
Attachment Of Assets......................Attachment Of Assets......................
Attachment Of Assets......................
 
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in  Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Nand Nagri (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
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
 
Stock Market Brief Deck for 4/24/24 .pdf
Stock Market Brief Deck for 4/24/24 .pdfStock Market Brief Deck for 4/24/24 .pdf
Stock Market Brief Deck for 4/24/24 .pdf
 
Classical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam SmithClassical Theory of Macroeconomics by Adam Smith
Classical Theory of Macroeconomics by Adam Smith
 
Financial institutions facilitate financing, economic transactions, issue fun...
Financial institutions facilitate financing, economic transactions, issue fun...Financial institutions facilitate financing, economic transactions, issue fun...
Financial institutions facilitate financing, economic transactions, issue fun...
 
Vp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsAppVp Girls near me Delhi Call Now or WhatsApp
Vp Girls near me Delhi Call Now or WhatsApp
 
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...
 
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
 

Trabajo

  • 1. Problema1 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema.nº1; import java.io.*; /** * * @author RositaRoblesArmas */ 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); } } Problema 2 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema2; import java.io.*; /** * * @author RositaRoblesArmas
  • 2. */ 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 } } Problema3 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema.pkg3; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema3 { /** * @param args the command line arguments */ public static void main(String[] args)throws IOException { //variable float vv,igv,pv; //entrada
  • 3. 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 } } Problema4 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema004; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema004 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { short a,n; int p; BufferedReader in =new BufferedReader(new InputStreamReader(System.in)); System.out.println("a: "); a=Short.parseShort(in.readLine()); System.out.println("n: "); n=Short.parseShort(in.readLine()); // TODO code application logic here p=(int)Math.pow((double)a, (double)n);
  • 4. System.out.println(""); System.out.println("Potencia: "+p); } } Problema5 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema5; import java.io.*; /** * * @author RositaRoblesArmas */ public class PROBLEMA5 { /** * @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 } } Problema6 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema6; import java.io.*; /** * * @author RositaRoblesArmas
  • 5. */ public class PROBLEMA6 { /** * @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); } } Problema7 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema07; import java.io.*; /** * * @author RositaRoblesArmas */ public class PROBLEMA07 {
  • 6. /** * @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); } } Problema8 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema8; import java.io.*; /** * * @author RositaRoblesArmas */ 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;
  • 7. System.out.println(""); System.out.println("Interes: " + i); System.out.println("Monto: " + m); } } Problema9 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema9; import java.io.*; /** * * @author RositaRoblesArmas */ 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); } } Problema10 /* * To change this template, choose Tools | Templates * and open the template in the editor. */
  • 8. package problema10; import java.io.*; /** * * @author RositaRoblesArmas */ 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 } } Problema11 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema11; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema11 { /** * @param args the command line arguments */ public static void main(String[] args) throws IOException { int n1, n2, m = 0;
  • 9. BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.println("Número 1: "); n1=(int) Integer.parseInt(in.readLine()); System.out.println("Número 2: "); n2=(int) Integer.parseInt(in.readLine()); if(n1>n2) m= n1; if(n2>n1) m= n2; System.out.println(""); System.out.println("Mayor:"+m); Problema12 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema12; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema12 { /** * @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);
  • 10. } } Problema13 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema13; import java.util.Scanner; /** * * @author RositaRoblesArmas */ public class Problema13 { /** * @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); } } Problema14 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema014; import java.io.*; /** * * @author RositaRoblesArmas */
  • 11. 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(); } } Problema15 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema015; import java.io.*; /** * * @author RositaRoblesArmas */ 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));
  • 12. 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(); } } Problema16 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema16; import java.io.*; /** * * @author RositaRoblesArmas */ public class PROBLEMA16 { /** * @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
  • 13. { m=n3; } } else { if(n2>n3) { m=n2; } else { m=n3; } } System.out.println(""); System.out.println("Mayor: " +m); } } Problema17 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema017; import java.io.*; /** * * @author RositaRoblesArmas */ 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; }
  • 14. System.out.println(""); System.out.println("Resultado: " + r); System.out.println(); } } Problema18 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema18; import java.io.*; /** * * @author RositaRoblesArmas */ public class PROBLEMA18 { /** * @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; }
  • 15. 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(); } } Problema19 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema19; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema19 { /** * @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 {
  • 16. 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(); } } Problema20 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema20; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema20 { /** * @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;
  • 17. } 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(); } } Problema21 * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema21; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema21 { /** * @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
  • 18. { if (t>=21 && t<=30) { c="CALOR"; } else { c="TROPICAL"; } } } System.out.println(""); System.out.println("Clima: " + c); System.out.println(); } } Problema22 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema22; import java.util.Scanner; /** * * @author RositaRoblesArmas */ public class Problema22 { /** * @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: ");
  • 19. 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(); } } Problema23 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema23; import java.io.*; /** * * @author RositaRoblesArmas */ public class PROBLEMA23 {
  • 20. /** * @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(); } } Problema24 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema24; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema24 { /** * @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());
  • 21. 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(); } } Problema25 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package problema25; import java.io.*; /** * * @author RositaRoblesArmas */ public class Problema25 { /** * @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)
  • 22. { 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(); } }