SlideShare ist ein Scribd-Unternehmen logo
1 von 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("");

     }      }   }

Weitere ähnliche Inhalte

Kürzlich hochgeladen

celula, tipos, teoria celular, energia y dinamica
celula, tipos, teoria celular, energia y dinamicacelula, tipos, teoria celular, energia y dinamica
celula, tipos, teoria celular, energia y dinamicaFlor Idalia Espinoza Ortega
 
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptDE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptELENA GALLARDO PAÚLS
 
Informatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosInformatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosCesarFernandez937857
 
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURA
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURAFORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURA
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURAEl Fortí
 
cortes de luz abril 2024 en la provincia de tungurahua
cortes de luz abril 2024 en la provincia de tungurahuacortes de luz abril 2024 en la provincia de tungurahua
cortes de luz abril 2024 en la provincia de tungurahuaDANNYISAACCARVAJALGA
 
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptx
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptxOLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptx
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptxjosetrinidadchavez
 
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...Carlos Muñoz
 
Clasificaciones, modalidades y tendencias de investigación educativa.
Clasificaciones, modalidades y tendencias de investigación educativa.Clasificaciones, modalidades y tendencias de investigación educativa.
Clasificaciones, modalidades y tendencias de investigación educativa.José Luis Palma
 
Manual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfManual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfMaryRotonda1
 
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptxTIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptxlclcarmen
 
30-de-abril-plebiscito-1902_240420_104511.pdf
30-de-abril-plebiscito-1902_240420_104511.pdf30-de-abril-plebiscito-1902_240420_104511.pdf
30-de-abril-plebiscito-1902_240420_104511.pdfgimenanahuel
 
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptx
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptxTECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptx
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptxKarlaMassielMartinez
 
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptx
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptxEXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptx
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptxPryhaSalam
 
la unidad de s sesion edussssssssssssssscacio fisca
la unidad de s sesion edussssssssssssssscacio fiscala unidad de s sesion edussssssssssssssscacio fisca
la unidad de s sesion edussssssssssssssscacio fiscaeliseo91
 
Sesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxSesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxMaritzaRetamozoVera
 
Estrategia de prompts, primeras ideas para su construcción
Estrategia de prompts, primeras ideas para su construcciónEstrategia de prompts, primeras ideas para su construcción
Estrategia de prompts, primeras ideas para su construcciónLourdes Feria
 
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdfPlanificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdfDemetrio Ccesa Rayme
 

Kürzlich hochgeladen (20)

celula, tipos, teoria celular, energia y dinamica
celula, tipos, teoria celular, energia y dinamicacelula, tipos, teoria celular, energia y dinamica
celula, tipos, teoria celular, energia y dinamica
 
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.pptDE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
DE LAS OLIMPIADAS GRIEGAS A LAS DEL MUNDO MODERNO.ppt
 
Informatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos BásicosInformatica Generalidades - Conceptos Básicos
Informatica Generalidades - Conceptos Básicos
 
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURA
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURAFORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURA
FORTI-MAYO 2024.pdf.CIENCIA,EDUCACION,CULTURA
 
Power Point: "Defendamos la verdad".pptx
Power Point: "Defendamos la verdad".pptxPower Point: "Defendamos la verdad".pptx
Power Point: "Defendamos la verdad".pptx
 
cortes de luz abril 2024 en la provincia de tungurahua
cortes de luz abril 2024 en la provincia de tungurahuacortes de luz abril 2024 en la provincia de tungurahua
cortes de luz abril 2024 en la provincia de tungurahua
 
Presentacion Metodología de Enseñanza Multigrado
Presentacion Metodología de Enseñanza MultigradoPresentacion Metodología de Enseñanza Multigrado
Presentacion Metodología de Enseñanza Multigrado
 
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptx
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptxOLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptx
OLIMPIADA DEL CONOCIMIENTO INFANTIL 2024.pptx
 
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
Plan Refuerzo Escolar 2024 para estudiantes con necesidades de Aprendizaje en...
 
Clasificaciones, modalidades y tendencias de investigación educativa.
Clasificaciones, modalidades y tendencias de investigación educativa.Clasificaciones, modalidades y tendencias de investigación educativa.
Clasificaciones, modalidades y tendencias de investigación educativa.
 
Manual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdfManual - ABAS II completo 263 hojas .pdf
Manual - ABAS II completo 263 hojas .pdf
 
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptxTIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
TIPOLOGÍA TEXTUAL- EXPOSICIÓN Y ARGUMENTACIÓN.pptx
 
30-de-abril-plebiscito-1902_240420_104511.pdf
30-de-abril-plebiscito-1902_240420_104511.pdf30-de-abril-plebiscito-1902_240420_104511.pdf
30-de-abril-plebiscito-1902_240420_104511.pdf
 
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptx
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptxTECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptx
TECNOLOGÍA FARMACEUTICA OPERACIONES UNITARIAS.pptx
 
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptx
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptxEXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptx
EXPANSIÓN ECONÓMICA DE OCCIDENTE LEÓN.pptx
 
la unidad de s sesion edussssssssssssssscacio fisca
la unidad de s sesion edussssssssssssssscacio fiscala unidad de s sesion edussssssssssssssscacio fisca
la unidad de s sesion edussssssssssssssscacio fisca
 
Unidad 3 | Metodología de la Investigación
Unidad 3 | Metodología de la InvestigaciónUnidad 3 | Metodología de la Investigación
Unidad 3 | Metodología de la Investigación
 
Sesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docxSesión de aprendizaje Planifica Textos argumentativo.docx
Sesión de aprendizaje Planifica Textos argumentativo.docx
 
Estrategia de prompts, primeras ideas para su construcción
Estrategia de prompts, primeras ideas para su construcciónEstrategia de prompts, primeras ideas para su construcción
Estrategia de prompts, primeras ideas para su construcción
 
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdfPlanificacion Anual 2do Grado Educacion Primaria   2024   Ccesa007.pdf
Planificacion Anual 2do Grado Educacion Primaria 2024 Ccesa007.pdf
 

Empfohlen

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
 

Empfohlen (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(""); } } }