16/11/2022 ; 5:28 PM
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
/* Incremento de precio.
|
||||
El programa, al recibir como dato el precio de un producto importado,
|
||||
➥incrementa 11% el mismo si éste es inferior a $1,500.
|
||||
|
||||
PRE y NPR: variable de tipo real. */
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float PRE, NPR;
|
||||
printf("ingrese el precio del producto: ");
|
||||
scanf("%f", &PRE);
|
||||
|
||||
if (PRE > 1500)
|
||||
{
|
||||
NPR = PRE * 1.11;
|
||||
printf("\nNuevo precio : % 7.2f", NPR);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user