martes, 5 de noviembre de 2019

Matriz 6

#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <windows.h>

using namespace std;

void captura();
void operacion();
void imprimir();
char nombre[20], factura[20];
int pr1, pr2, pr3, t, iva, x, y;

void gotoxy(int x, int y){
HANDLE hcon;
hcon=GetStdHandle(STD_OUTPUT_HANDLE);
COORD dwpos;
dwpos.X=x;
dwpos.Y=y;
SetConsoleCursorPosition(hcon,dwpos);
}

int main(){
captura();
operacion();
imprimir(); 
system("PAUSE");
return 0;
}

void captura(){
cout<<"ingrese su nombre"<<endl;
gets (nombre);
cout<<"ingresa el numero de la factura"<<endl;
cin>>factura;
cout<<"ingresa el precio del primer producto"<<endl;
cin>>pr1;
cout<<"ingresa el precio del segundo producto"<<endl;
cin>>pr2;
cout<<"ingresa el precio del tercer producto"<<endl;
cin>>pr3;
}

void operacion(){
t=pr1+pr2+pr3;
iva=t*0.16;
}

void imprimir(){
cout<<""<<endl;
cout<<"EL TOTAL ES:"<<endl;
cout<<t<<endl;
}

No hay comentarios.:

Publicar un comentario