Está en la página 1de 4

#include <iostream.

h>

#include <conio.h>

void main()

float llant,total,uni;

cout<<"INGRESE NUMERO DE LLANTAS.....:";cin>>llant;

if (llant<=0)

cout<<"DATOS ERRONEOS";

else

if(llant<5)

uni=300;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

else

if(llant<=10)

uni=250;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

else

if(llant>10)

uni=200;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

getch();

}
#include <iostream.h>

#include <conio.h>

void main()

float llant,total,uni;

cout<<"INGRESE NUMERO DE LLANTAS.....:";cin>>llant;

if (llant<=0)

cout<<"DATOS ERRONEOS";

else

if(llant<5)

uni=300;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

else

if(llant<=10)

uni=250;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

else

if(llant>10)

uni=200;

total=llant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"PRECIO POR UNIDAD......:"<<uni<<endl;

cout<<"GRACIAS POR SU COMPRA .......REGRESE PRONTO...:)";

getch();

}
#include <iostream.h>

#include <conio.h>

void main()

int uni,cant;

float total;

cout<<"INGRESE LA CANTIDAD CONSUMIDA......:";cin>>cant;

uni=3;

if (cant<=0)

cout<<"DATOS ERRONEOS";

else

if(cant<50)

total=cant*uni*0.99;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

else

if(cant<=100)

total=cant*uni*0.95;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

else

if(cant>200)

total=cant*uni;

cout<<"TOTAL A PAGAR......:"<<total<<endl;

cout<<"GRACIAS POR SU COMPRA .......REGRESE PRONTO...:)";

getch();

También podría gustarte