ALGORITMO QUE CALCULE EL IGV SEGÚN EL MONTO DE COMPRA

Categoría de Estructura Condicional Simple


Algoritmo de como calcular el impuesto general a las ventas (IGV)

💻 Hacer un programa que solicite el precio y la cantidad de compra; si el monto es mayor a S/.100 calcular el IGV. Mostrar el total a pagar y IGV si lo hubiera.


Algoritmo en pseint para calcular el igv y el monto a pagar PSeInt Estricto : DESCARGA EL CÓDIGO

algoritmo que calcule el IGV

Algoritmo en pseint - short youtube
Algoritmo programacion_work 
    Definir precio, IGV, monto como Real;
    Definir cant como Entero;	
    IGV <- 0;
    monto <- 0;	
    Escribir "CALCULAR IGV SEGUN EL MONTO DE COMPRA";	
    Escribir Sin Saltar "INGRESE PRECIO : S/.";
    Leer precio;
    Escribir Sin Saltar "INGRESE CANTIDAD : ";
    Leer cant;	
    monto <- (precio * cant);	
    Si (monto > 100) Entonces
        IGV <- monto * 0.18; // 18%
    FinSi
    Escribir "";
    Escribir "TOTAL         : S/.", monto;
    Escribir "IGV 18%       : S/.", IGV;
    Escribir "TOTAL A PAGAR : S/.", (monto + IGV);
FinAlgoritmo
Algoritmo que calcule el monto a pagar en pseint

código en python que calcular el igv y el monto a pagar Python :

print("CALCULAR IGV 18% SEGUN EL MONTO DE COMPRA")
IGV = 0
precio = float(input("INGRESE PRECIO   : S/."))
cant = int(input("INGRESE CANTIDAD : "))
monto = precio * cant
if monto > 100:
    IGV = monto * 0.18
print()
print("TOTAL         : S/.", monto)
print("IGV 18%       : S/.", IGV)
print("TOTAL A PAGAR : S/.", (monto + IGV) )

código en Lenguaje C que calcule el monto de compra Lenguaje C :

#include<stdio.h>
int main() {
    float precio, IGV=0, monto=0;
    int cant;
    printf("05. CALCULAR IGV SEGUN EL MONTO DE COMPRA.\n\n");
    printf("INGRESE PRECIO   : S/.");
    scanf("%f",&precio); 
    printf("INGRESE CANTIDAD : ");
    scanf("%d",&cant); 
    monto = (precio * cant);
    if(monto > 100){
        IGV = monto * 0.18;
    }  
    printf("\nTOTAL            : S/. %.2f\n", monto);
    printf("IGV 18 PORCIENTO : S/. %.2f\n", IGV);
    printf("TOTAL A PAGAR    : S/. %.2f\n", (monto + IGV));        
    return 0;
}

código en Dev C++ que calcule el igv y el monto a pagar Dev C++ :

#include<iostream>
using namespace std;
int main() {
    double precio, IGV=0, monto=0;
    int cant;
    cout << "05. CALCULAR IGV SEGUN EL MONTO DE COMPRA.\n\n"; 
    cout << "INGRESE PRECIO   : S/.";
    cin << precio;	
    cout << "INGRESE CANTIDAD : ";
    cin << cant;	
    monto = (precio * cant);
    if(monto > 100){
        IGV = monto * 0.18;
    }
    cout << endl;
    cout << "TOTAL         : S/." << monto << endl;
    cout << "IGV 18%       : S/." << IGV << endl;
    cout << "TOTAL A PAGAR : S/." << (monto + IGV) << endl;
    return 0;
}

Programar en Java NetBeans para obtener el igv Java NetBeans :

package programacion_work;
import java.util.Scanner;
public class calcular_igv_de_compra {
    public static void main(String[] args) {
        double precio, IGV=0, monto=0;  
        int cant;   
        Scanner ingreso=new Scanner(System.in);
        System.out.print("INGRESE PRECIO   : S/.");
        precio = Double.parseDouble(ingreso.next());   
        System.out.print("INGRESE CANTIDAD : ");
        cant = Integer.parseInt(ingreso.next());  
        monto = (precio * cant);
        if(monto > 100){
            IGV = monto * 0.18;
        } 
        System.out.println("");
        System.out.println("TOTAL         : S/." + monto);
        System.out.println("IGV 18%       : S/." + IGV);
        System.out.println("TOTAL A PAGAR : S/." + (monto + IGV));  
    }     
}



Facebook de www.programacion.work. Canal de Youtube de www.programacion.work. Twitter de www.programacion.work. TikTok de www.programacion.work.


Política de cookies

Política de Privacidad

Aviso Legal y Términos De Uso