04.01.2023 Views

Documento sin título (1)

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}

}

}

return 0;

}

}

}

gasolineria

#include<stdio.h>

int main() {

float faltante;

int gas;

float itros;

float litros;

float normal;

float premium;

float sobrante;

float total_de_pagar;

float x;

printf("bienvenido\n");

printf("que gasolina desea?\n");

printf("premium (1) o normal (2)\n");

scanf("%i",&gas);

premium = 20;

normal = 15;

switch (gas) {

case 1:

printf("cuantos litros desea\n");

scanf("%f",&litros);

total_de_pagar = premium*litros;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!