Informática, pregunta formulada por RicardoP0zole, hace 16 horas

REALIZAR CON IF LO SIGUIENTE
SE COMPRA EN UNA MUEBLERIA UN MUEBLE x, SI EL MUEBLE CUESTA DE 1-2000 SE
REALIZA DESCUENTO DEL 10%, SI EL MUEBLE CUESTA DE 2001-4000 SE REALIZA
DESCUENTO DEL 20% Y SI EL MUEBLE CUESTA DE 4001- EEN ADELANTE SE REALIZA
DESCUENTO DEL 40%,
EL COMPRADOR PUEDE LLEVAR 1, 2, O 3 DEL ATICULO DESEADO, LA CANTIDAD NO
IMPORTA PARA EL DESCUENTO.
A) SOLICITA ELPRECIO
B) SOLICITA LA CANTODAD
C) MUESTRA EL TOTAL DE COMPRA SIN DESCUENTO
D) MUESTRA ELL DESCUENTO QUE SE LE REALIZA
E) MUESTRA EL TOTAL DE COMPRA CON DESCUENTO

Respuestas a la pregunta

Contestado por flavio62
1

Respuesta:

descuento Muebles C++

Explicación:

#include<iostream>

using namespace std;

int main() {

float cantidadmuebles;

float descuento;

string descuenton="";

float mueble;

float muebleprecio;

cout << "Precio del mueble:" << endl;

cin >> muebleprecio;

cout << "Cantidad de muebles:" << endl;

cin >> cantidadmuebles;

muebleprecio = muebleprecio*cantidadmuebles;

if (muebleprecio>=1 && muebleprecio<=2000) {

 descuento = muebleprecio-(muebleprecio*0.10);

 descuenton = "10%";

}

else if (muebleprecio>=2001 && muebleprecio<=4000)

 {

 descuento = muebleprecio-(muebleprecio*0.20);

 descuenton = "20%";

}

else if (muebleprecio>=4001)  

{

 

 descuento = muebleprecio-(muebleprecio*0.40);

 descuenton = "40%";

}  

else {

 }  

cout << "Total sin descuento:" << muebleprecio << endl;

cout << "Descuento de " << descuenton << endl;

cout << "Total con descuento:" << descuento << endl;

return 0;

}

Adjuntos:

flavio62: No, eso es PSeint. Ahora? Puedes modificarlo?
RicardoP0zole: No lo siento esque Programacion no se nada :c
flavio62: Pucha, ahora lo hago en C++
RicardoP0zole: Enserio? perdon por hacerte esto :c
flavio62: No, yo no sabía en qué era, pero ambos llevan a lo mismo, dile que te confundiste y usaste PSeint para hacerlo.
RicardoP0zole: esque no me deja subir el archivo que no sea en c++ si no pues si lo subia pero si no tienes tiempo o ganas muchas gracias igual ya me respondiste 1
RicardoP0zole: <3
RicardoP0zole: muchas gracias enserio ni como agradecerte <3
flavio62: Por nada, y de dónde eres?
flavio62: Acabo de observar un error, y con ese error no cumple las otras condiciones y no hace el descuento, ya que muebleprecio es una variable y mueble otra.
Otras preguntas