SlideShare une entreprise Scribd logo
1  sur  9
DESCUENTO Katherine Sierra García Yeny Stefania Bedoya
Normalmente en compras en supermercado algunas amas de casa ponen en su carrito los artículos que van tomando de los estantes, la señora quiere asegurarse de que el cajero le cobre bien lo que ella ha comprado, por lo que cada vez que toma un articulo anota su precio junto con la cantidad de artículos iguales que ha tomado y determina cuanto dinero gastara en ese articulo; a esto le suma lo que ira gastando en los demás artículos, hasta que decide que ya tomo todo lo que necesitaba. Se requiere un programa que le ayude a las amas de casa a obtener el total de sus compras y la relación de sus productos, adicionalmente que le determine un descuento de tal forma que al llegar a la caja y sacar una bolita de color, les diga el valor correspondiente a la cantidad que pagara cada cliente desde que la tienda abre hasta que cierra. Se sabe que si el color de la bolita es roja el cliente obtendrá un 40% de descuento; si es amarilla un 25% y si es blanca no obtendrá descuento.
ANALISIS ¿Que me piden? Respuesta: Obtener el total de la compra de una ama de casa al hacer las compras en el supermercado, la relación de los productos y calcular el descuento, al sacar una determinada bola de un color especifico en la caja ¿Que me dan? Respuesta :El costo del producto, y el nombre codigo del producto, los porcentajes de descuento en las bolas de colores al seleccionar ¿Como lo hago? Respuesta :Se desea calcular el total de la compra de artículos en un almacén, de tal forma se ingresa el producto y el valor de la unidad, generando el total de la compra, para finalmente calcular el descuento respectivo al sacar una bola de color
DFD
HTML <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>DESCUENTO</title> <FONT COLOR="BLUE" FACE="ARIAL" SIZE="4"><BODY BGCOLOR="BLACK"> <script languaje="JavaScript">  valorcompra=prompt("ingrese el valor de su compra"); valorcompra=parseFloat(valorcompra); color=prompt("ingrese el codigo del color de su bola, si es roja escriba 1, si es amarilla 2 y si es roja 3"); color=parseFloat(color); if(color==1) { var descuento= valorcompra*0.45; var valortotal=valorcompra-descuento;
alert (" Su compra de " + valorcompra + " pesos, la bola roja tendra un descuento del 45%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); } if(color==2) { var descuento= valorcompra*0.25; var valortotal=valorcompra-descuento; alert ("Su compra de " + valorcompra + " pesos, la bola amarilla le hace ganar un descuento del 25%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); } if(color==3) { var descuento= 0; var valortotal=valorcompra-descuento; alert ("Su compra de " + valorcompra + " pesos, la bola blanca no le da  descuento, el valor total a pagar por su compra es de " + valortotal); }
document.writeln("Descuento "); document.writeln (" <br><br>Su compra de " + valorcompra + " pesos, la bola roja tendra un descuento del 45%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); document.writeln("<br><br>Su compra de " + valorcompra + " pesos, la bola amarilla tendra 25%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); document.writeln("<br><br>Su compra de " + valorcompra + " pesos, la bola blanca no tendra  descuento, el valor total a pagar por su compra es de " + valortotal); </script></head><body><br><br>Descuento </body></html>
descuento

Contenu connexe

En vedette

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
 

En vedette (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...
 

descuento

  • 1. DESCUENTO Katherine Sierra García Yeny Stefania Bedoya
  • 2. Normalmente en compras en supermercado algunas amas de casa ponen en su carrito los artículos que van tomando de los estantes, la señora quiere asegurarse de que el cajero le cobre bien lo que ella ha comprado, por lo que cada vez que toma un articulo anota su precio junto con la cantidad de artículos iguales que ha tomado y determina cuanto dinero gastara en ese articulo; a esto le suma lo que ira gastando en los demás artículos, hasta que decide que ya tomo todo lo que necesitaba. Se requiere un programa que le ayude a las amas de casa a obtener el total de sus compras y la relación de sus productos, adicionalmente que le determine un descuento de tal forma que al llegar a la caja y sacar una bolita de color, les diga el valor correspondiente a la cantidad que pagara cada cliente desde que la tienda abre hasta que cierra. Se sabe que si el color de la bolita es roja el cliente obtendrá un 40% de descuento; si es amarilla un 25% y si es blanca no obtendrá descuento.
  • 3. ANALISIS ¿Que me piden? Respuesta: Obtener el total de la compra de una ama de casa al hacer las compras en el supermercado, la relación de los productos y calcular el descuento, al sacar una determinada bola de un color especifico en la caja ¿Que me dan? Respuesta :El costo del producto, y el nombre codigo del producto, los porcentajes de descuento en las bolas de colores al seleccionar ¿Como lo hago? Respuesta :Se desea calcular el total de la compra de artículos en un almacén, de tal forma se ingresa el producto y el valor de la unidad, generando el total de la compra, para finalmente calcular el descuento respectivo al sacar una bola de color
  • 4.
  • 5. DFD
  • 6. HTML <html><head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> <title>DESCUENTO</title> <FONT COLOR="BLUE" FACE="ARIAL" SIZE="4"><BODY BGCOLOR="BLACK"> <script languaje="JavaScript"> valorcompra=prompt("ingrese el valor de su compra"); valorcompra=parseFloat(valorcompra); color=prompt("ingrese el codigo del color de su bola, si es roja escriba 1, si es amarilla 2 y si es roja 3"); color=parseFloat(color); if(color==1) { var descuento= valorcompra*0.45; var valortotal=valorcompra-descuento;
  • 7. alert (" Su compra de " + valorcompra + " pesos, la bola roja tendra un descuento del 45%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); } if(color==2) { var descuento= valorcompra*0.25; var valortotal=valorcompra-descuento; alert ("Su compra de " + valorcompra + " pesos, la bola amarilla le hace ganar un descuento del 25%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); } if(color==3) { var descuento= 0; var valortotal=valorcompra-descuento; alert ("Su compra de " + valorcompra + " pesos, la bola blanca no le da descuento, el valor total a pagar por su compra es de " + valortotal); }
  • 8. document.writeln("Descuento "); document.writeln (" <br><br>Su compra de " + valorcompra + " pesos, la bola roja tendra un descuento del 45%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); document.writeln("<br><br>Su compra de " + valorcompra + " pesos, la bola amarilla tendra 25%, correspondiente a " + descuento + " pesos, el valor total a pagar por su compra es de " + valortotal); document.writeln("<br><br>Su compra de " + valorcompra + " pesos, la bola blanca no tendra descuento, el valor total a pagar por su compra es de " + valortotal); </script></head><body><br><br>Descuento </body></html>