SlideShare una empresa de Scribd logo
1 de 8
UNIVERSIDAD CATOLICA
LOS ANGELES DE
CHIMBOTE
                     2012
   ESTRUCTURA DE DATOS I EN
         JAVA BLOC DE NOTAS




                        Víctor Hugo
ESCUELA DE INGENIERIA   Campoverde

DE SISTEMAS             González
Contenido
UNIVERSIDAD CATOLICA LOS ANGELES DE CHIMBOTE ...................................................................................... 0
Ejercicio 1 .............................................................................................................................. 2
Ejercicio 2 .............................................................................................................................. 4
Ejercicio 3 .............................................................................................................................. 5
Ejercicio 4 .............................................................................................................................. 6
Ejercicio 1

La Distribuidora del Norte S.A. desea adquirir materia prima para su producción
para esto de saber el nombre del proveedor, el nombre del producto, la cantidad
que va a comprar y el precio del producto. Si la cantidad a comprar supera va a
comprar y los S/.1500 la empresa distribuidora se hará acreedora a un descuento
del 5.5%,

 Además podrá elegir uno de los tres obsequios que ofrece el proveedor; de lo
contrario no recibirá nada. Calcular el total a pagar de la distribuidora.

package Clases1;

import java.io.*;

public class Distrubuidora1 {

  public static void main(String[] args) throws Exception {

   BufferedReader        br             =         new         BufferedReader(new
InputStreamReader(System.in));

    String NombreP,NombreProd;

    double cantCompra,Pproduc,total,TotalPagar;

    double descuento=0.055;

    System.out.print("Nombre del Proveedor :");

    NombreP= br.readLine();

    System.out.print("Nombre del Producto :");

    NombreProd= br.readLine();

    System.out.print("cantidad que va a comprar:");

    cantCompra=Double.parseDouble(br.readLine());

    System.out.print("precio del producto :");

    Pproduc=Double.parseDouble(br.readLine());

    total= cantCompra*Pproduc;

    if(total>1500){
TotalPagar = total-descuento;

   System.out.println("USTED       ES   ACREDOR    DE     UNOS   DE   LOSTRE
PREMIOS");

   } else{

    TotalPagar = total;

    }

        System.out.print("TOTAL A PAGAR :"+TotalPagar);

        }     }
Ejercicio 2
La distribuidora desea calcular el sueldo semanal de sus 15 trabajador para esto
debe saber el numero 15 trabajador para esto debe saber el de horas trabajadas
y el precio por hora. Si el número de horas supera las 40 horas, debe pagársele
por hora extra S/.15. Calcular el sueldo semanal.

package Clases1;

import java.io.*;

public class Distribuidora2 {

  public static void main(String[] args) throws Exception{

   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

      double NHorasT,Phoras,horasExtras = 0,Eh,THoras,Sueldo,Ts;

         for(int i = 1; i<= 15; i++){

              System.out.println("TRABAJADOR NUMERO "+i);

             System.out.print("Numeros de horas trabajadas:");

      NHorasT=Double.parseDouble(br.readLine());

      System.out.print("precio de Horas          :");

      Phoras=Double.parseDouble(br.readLine());

              if(NHorasT>40){

             Eh= NHorasT-40;

         Ts=Eh*15;

         Sueldo= 40*Phoras+Ts;

         System.out.println("extras :"+Ts);

  }     else {

              Sueldo= 40*Phoras;

                }   System.out.println("SUELDO SEMANAL"+" "+i+"     :"+Sueldo);

  }     }}
Ejercicio 3

 Un restaurante para calcular el total a pagar debe saber lo siguiente: el nombre
del cliente, el tipo de plato, y la cantidad de platos que comió. Si el tipo de plato es
Ejecutivo pagará por cada plato S/.35 y recibirá un descuento del 2 de lo contrario
es Especial y pagará por plato S/.20. Calcular el total a pagar.

package Clases1;

import java.io.*;

public class Restaurante {

 public static void main(String[] args) throws Exception {

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

          String Nombre,NombreProd,plato;

    double cant,TotalPagar;

      System.out.print("Ingrese su nombre: ");

  Nombre=br.readLine();

  System.out.print("Cantidad de Platos a Consumir : ");

  cant=Double.parseDouble(br.readLine());

     System.out.print("QUE PLATO CONSUMIO               : ");

  plato=br.readLine();

 if(plato.equals("Ejecutivo")){

    double b=35*can;

      System.out.print("Total A Pagar : "+b);

     } else {

    if(plato.equals("Especial")){

       double c=20*can;      System.out.print("Total A Pagar : "+c);

      }             }}            }
Ejercicio 4

Desarrollar un programa que permita calcular la nota final de los alumnos del
curso de Algoritmos y Programación, teniendo en cuenta que las evaluaciones

Consideradas son las siguientes:

                       EVALUACION PORCENTAJE

                           PRACTICA                 0.25
                           TRABAJO                  0.15

                           INTERVENCION             0.10
                           ORAL
                           EXAMEN DE                0.50
                           UNIDAD


package Clases1;

import java.io.*;

public class NotaFinal {

  public static void main(String[] args) throws IOException{

     BufferedReader                   br=new                   BufferedReader(new
InputStreamReader(System.in));

     System.out.println("CURSO DE ALGORITMOS Y PROGRAMACION");

     System.out.println("CUANTOS ALUMNOS VA A INGRESAR:");

     int ingreso=Integer.parseInt(br.readLine());

     int i;

     double prac=0.25,tra=0.15,intoral=0.10,Examen=0.50;

     double Nprac,Ntra,Nintoral,NExamen;

     double Tprac,Ttra,Tintoral,TExamen;
for(i=1;i<ingreso;i++){

                     System.out.print("INGRESE LA NOTA DE PRACTICA "+i+":");

                     Nprac=Integer.parseInt(br.readLine());

                           Tprac=Nprac*prac;

                     System.out.print("INGRESE LA NOTA DE TRABAJOS "+i+":");

                        Ntra=Integer.parseInt(br.readLine());

                           Ttra=Ntra*tra;

                     System.out.print("INGRESE LA NOTA DE INT. ORAL "+"
"+i+":");

                         Nintoral=Integer.parseInt(br.readLine());

                           Tintoral=Nintoral*intoral;

                     System.out.print("INGRESE LA NOTA DE EXAMEN "+i+":");

                         NExamen=Integer.parseInt(br.readLine());

                         TExamen=NExamen*Examen;

                     double Total=TExamen+Tprac+Ttra+Tintoral;

                     System.out.println("TOTAL DE NOTA "+i+":"+Total);

                     System.out.println("");

     }      }   }

Más contenido relacionado

Último

Día de la Madre Tierra-1.pdf día mundial
Día de la Madre Tierra-1.pdf día mundialDía de la Madre Tierra-1.pdf día mundial
Día de la Madre Tierra-1.pdf día mundialpatriciaines1993
 
EDUCACION FISICA 1° PROGRAMACIÓN ANUAL 2023.docx
EDUCACION FISICA 1°  PROGRAMACIÓN ANUAL 2023.docxEDUCACION FISICA 1°  PROGRAMACIÓN ANUAL 2023.docx
EDUCACION FISICA 1° PROGRAMACIÓN ANUAL 2023.docxLuisAndersonPachasto
 
Manejo del Dengue, generalidades, actualización marzo 2024 minsa
Manejo del Dengue, generalidades, actualización marzo 2024 minsaManejo del Dengue, generalidades, actualización marzo 2024 minsa
Manejo del Dengue, generalidades, actualización marzo 2024 minsaLuis Minaya
 
Fichas de Matemática TERCERO DE SECUNDARIA.pdf
Fichas de Matemática TERCERO DE SECUNDARIA.pdfFichas de Matemática TERCERO DE SECUNDARIA.pdf
Fichas de Matemática TERCERO DE SECUNDARIA.pdfssuser50d1252
 
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdf
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdfTema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdf
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdfDaniel Ángel Corral de la Mata, Ph.D.
 
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024gharce
 
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdf
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdfFichas de MatemáticA QUINTO DE SECUNDARIA).pdf
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdfssuser50d1252
 
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...fcastellanos3
 
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptx
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptxMonitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptx
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptxJUANCARLOSAPARCANARE
 
periodico mural y sus partes y caracteristicas
periodico mural y sus partes y caracteristicasperiodico mural y sus partes y caracteristicas
periodico mural y sus partes y caracteristicas123yudy
 
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdf
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdfTarea 5_ Foro _Selección de herramientas digitales_Manuel.pdf
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdfManuel Molina
 
Mapa Mental de estrategias de articulación de las areas curriculares.pdf
Mapa Mental de estrategias de articulación de las areas curriculares.pdfMapa Mental de estrategias de articulación de las areas curriculares.pdf
Mapa Mental de estrategias de articulación de las areas curriculares.pdfvictorbeltuce
 
Uses of simple past and time expressions
Uses of simple past and time expressionsUses of simple past and time expressions
Uses of simple past and time expressionsConsueloSantana3
 
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptx
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptxPresentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptx
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptxYeseniaRivera50
 
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdf
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdfFichas de matemática DE PRIMERO DE SECUNDARIA.pdf
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdfssuser50d1252
 
cuadernillo de lectoescritura para niños de básica
cuadernillo de lectoescritura para niños de básicacuadernillo de lectoescritura para niños de básica
cuadernillo de lectoescritura para niños de básicaGianninaValeskaContr
 

Último (20)

Día de la Madre Tierra-1.pdf día mundial
Día de la Madre Tierra-1.pdf día mundialDía de la Madre Tierra-1.pdf día mundial
Día de la Madre Tierra-1.pdf día mundial
 
EDUCACION FISICA 1° PROGRAMACIÓN ANUAL 2023.docx
EDUCACION FISICA 1°  PROGRAMACIÓN ANUAL 2023.docxEDUCACION FISICA 1°  PROGRAMACIÓN ANUAL 2023.docx
EDUCACION FISICA 1° PROGRAMACIÓN ANUAL 2023.docx
 
Manejo del Dengue, generalidades, actualización marzo 2024 minsa
Manejo del Dengue, generalidades, actualización marzo 2024 minsaManejo del Dengue, generalidades, actualización marzo 2024 minsa
Manejo del Dengue, generalidades, actualización marzo 2024 minsa
 
Fichas de Matemática TERCERO DE SECUNDARIA.pdf
Fichas de Matemática TERCERO DE SECUNDARIA.pdfFichas de Matemática TERCERO DE SECUNDARIA.pdf
Fichas de Matemática TERCERO DE SECUNDARIA.pdf
 
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdf
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdfTema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdf
Tema 8.- Gestion de la imagen a traves de la comunicacion de crisis.pdf
 
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024
SISTEMA INMUNE FISIOLOGIA MEDICA UNSL 2024
 
Earth Day Everyday 2024 54th anniversary
Earth Day Everyday 2024 54th anniversaryEarth Day Everyday 2024 54th anniversary
Earth Day Everyday 2024 54th anniversary
 
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdf
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdfFichas de MatemáticA QUINTO DE SECUNDARIA).pdf
Fichas de MatemáticA QUINTO DE SECUNDARIA).pdf
 
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
Estas son las escuelas y colegios que tendrán modalidad no presencial este lu...
 
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptx
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptxMonitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptx
Monitoreo a los coordinadores de las IIEE JEC_28.02.2024.vf.pptx
 
periodico mural y sus partes y caracteristicas
periodico mural y sus partes y caracteristicasperiodico mural y sus partes y caracteristicas
periodico mural y sus partes y caracteristicas
 
Sesión La luz brilla en la oscuridad.pdf
Sesión  La luz brilla en la oscuridad.pdfSesión  La luz brilla en la oscuridad.pdf
Sesión La luz brilla en la oscuridad.pdf
 
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdf
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdfTarea 5_ Foro _Selección de herramientas digitales_Manuel.pdf
Tarea 5_ Foro _Selección de herramientas digitales_Manuel.pdf
 
recursos naturales america cuarto basico
recursos naturales america cuarto basicorecursos naturales america cuarto basico
recursos naturales america cuarto basico
 
Mapa Mental de estrategias de articulación de las areas curriculares.pdf
Mapa Mental de estrategias de articulación de las areas curriculares.pdfMapa Mental de estrategias de articulación de las areas curriculares.pdf
Mapa Mental de estrategias de articulación de las areas curriculares.pdf
 
PPTX: La luz brilla en la oscuridad.pptx
PPTX: La luz brilla en la oscuridad.pptxPPTX: La luz brilla en la oscuridad.pptx
PPTX: La luz brilla en la oscuridad.pptx
 
Uses of simple past and time expressions
Uses of simple past and time expressionsUses of simple past and time expressions
Uses of simple past and time expressions
 
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptx
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptxPresentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptx
Presentación de Estrategias de Enseñanza-Aprendizaje Virtual.pptx
 
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdf
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdfFichas de matemática DE PRIMERO DE SECUNDARIA.pdf
Fichas de matemática DE PRIMERO DE SECUNDARIA.pdf
 
cuadernillo de lectoescritura para niños de básica
cuadernillo de lectoescritura para niños de básicacuadernillo de lectoescritura para niños de básica
cuadernillo de lectoescritura para niños de básica
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Estructura de datos

  • 1. UNIVERSIDAD CATOLICA LOS ANGELES DE CHIMBOTE 2012 ESTRUCTURA DE DATOS I EN JAVA BLOC DE NOTAS Víctor Hugo ESCUELA DE INGENIERIA Campoverde DE SISTEMAS González
  • 2. Contenido UNIVERSIDAD CATOLICA LOS ANGELES DE CHIMBOTE ...................................................................................... 0 Ejercicio 1 .............................................................................................................................. 2 Ejercicio 2 .............................................................................................................................. 4 Ejercicio 3 .............................................................................................................................. 5 Ejercicio 4 .............................................................................................................................. 6
  • 3. Ejercicio 1 La Distribuidora del Norte S.A. desea adquirir materia prima para su producción para esto de saber el nombre del proveedor, el nombre del producto, la cantidad que va a comprar y el precio del producto. Si la cantidad a comprar supera va a comprar y los S/.1500 la empresa distribuidora se hará acreedora a un descuento del 5.5%, Además podrá elegir uno de los tres obsequios que ofrece el proveedor; de lo contrario no recibirá nada. Calcular el total a pagar de la distribuidora. package Clases1; import java.io.*; public class Distrubuidora1 { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String NombreP,NombreProd; double cantCompra,Pproduc,total,TotalPagar; double descuento=0.055; System.out.print("Nombre del Proveedor :"); NombreP= br.readLine(); System.out.print("Nombre del Producto :"); NombreProd= br.readLine(); System.out.print("cantidad que va a comprar:"); cantCompra=Double.parseDouble(br.readLine()); System.out.print("precio del producto :"); Pproduc=Double.parseDouble(br.readLine()); total= cantCompra*Pproduc; if(total>1500){
  • 4. TotalPagar = total-descuento; System.out.println("USTED ES ACREDOR DE UNOS DE LOSTRE PREMIOS"); } else{ TotalPagar = total; } System.out.print("TOTAL A PAGAR :"+TotalPagar); } }
  • 5. Ejercicio 2 La distribuidora desea calcular el sueldo semanal de sus 15 trabajador para esto debe saber el numero 15 trabajador para esto debe saber el de horas trabajadas y el precio por hora. Si el número de horas supera las 40 horas, debe pagársele por hora extra S/.15. Calcular el sueldo semanal. package Clases1; import java.io.*; public class Distribuidora2 { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); double NHorasT,Phoras,horasExtras = 0,Eh,THoras,Sueldo,Ts; for(int i = 1; i<= 15; i++){ System.out.println("TRABAJADOR NUMERO "+i); System.out.print("Numeros de horas trabajadas:"); NHorasT=Double.parseDouble(br.readLine()); System.out.print("precio de Horas :"); Phoras=Double.parseDouble(br.readLine()); if(NHorasT>40){ Eh= NHorasT-40; Ts=Eh*15; Sueldo= 40*Phoras+Ts; System.out.println("extras :"+Ts); } else { Sueldo= 40*Phoras; } System.out.println("SUELDO SEMANAL"+" "+i+" :"+Sueldo); } }}
  • 6. Ejercicio 3 Un restaurante para calcular el total a pagar debe saber lo siguiente: el nombre del cliente, el tipo de plato, y la cantidad de platos que comió. Si el tipo de plato es Ejecutivo pagará por cada plato S/.35 y recibirá un descuento del 2 de lo contrario es Especial y pagará por plato S/.20. Calcular el total a pagar. package Clases1; import java.io.*; public class Restaurante { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String Nombre,NombreProd,plato; double cant,TotalPagar; System.out.print("Ingrese su nombre: "); Nombre=br.readLine(); System.out.print("Cantidad de Platos a Consumir : "); cant=Double.parseDouble(br.readLine()); System.out.print("QUE PLATO CONSUMIO : "); plato=br.readLine(); if(plato.equals("Ejecutivo")){ double b=35*can; System.out.print("Total A Pagar : "+b); } else { if(plato.equals("Especial")){ double c=20*can; System.out.print("Total A Pagar : "+c); } }} }
  • 7. Ejercicio 4 Desarrollar un programa que permita calcular la nota final de los alumnos del curso de Algoritmos y Programación, teniendo en cuenta que las evaluaciones Consideradas son las siguientes: EVALUACION PORCENTAJE PRACTICA 0.25 TRABAJO 0.15 INTERVENCION 0.10 ORAL EXAMEN DE 0.50 UNIDAD package Clases1; import java.io.*; public class NotaFinal { public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.println("CURSO DE ALGORITMOS Y PROGRAMACION"); System.out.println("CUANTOS ALUMNOS VA A INGRESAR:"); int ingreso=Integer.parseInt(br.readLine()); int i; double prac=0.25,tra=0.15,intoral=0.10,Examen=0.50; double Nprac,Ntra,Nintoral,NExamen; double Tprac,Ttra,Tintoral,TExamen;
  • 8. for(i=1;i<ingreso;i++){ System.out.print("INGRESE LA NOTA DE PRACTICA "+i+":"); Nprac=Integer.parseInt(br.readLine()); Tprac=Nprac*prac; System.out.print("INGRESE LA NOTA DE TRABAJOS "+i+":"); Ntra=Integer.parseInt(br.readLine()); Ttra=Ntra*tra; System.out.print("INGRESE LA NOTA DE INT. ORAL "+" "+i+":"); Nintoral=Integer.parseInt(br.readLine()); Tintoral=Nintoral*intoral; System.out.print("INGRESE LA NOTA DE EXAMEN "+i+":"); NExamen=Integer.parseInt(br.readLine()); TExamen=NExamen*Examen; double Total=TExamen+Tprac+Ttra+Tintoral; System.out.println("TOTAL DE NOTA "+i+":"+Total); System.out.println(""); } } }