Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created November 13, 2020 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/a4bb9507a855ef5b1f411bb0cbccb540 to your computer and use it in GitHub Desktop.
Save parzibyte/a4bb9507a855ef5b1f411bb0cbccb540 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
float precioOriginal, porcentajeAumento;
printf("Ingresa el precio original: ");
scanf("%f", &precioOriginal);
printf("Ingresa el porcentaje de aumento: ");
scanf("%f", &porcentajeAumento);
float aumento = precioOriginal * (porcentajeAumento / 100);
float precioConAumento = precioOriginal + aumento;
printf("Precio con aumento: %0.2f", precioConAumento);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment