Programas De Practica C++

Páginas: 2 (262 palabras) Publicado: 23 de mayo de 2012
/* VENTA.CPP CALCULA DESCUENTO POR VENTA */
# include "stdio.h"
# include "math.h"
# include "conio.h"
# include "dos.h"
# include "process.h"
# include "iomanip.h"
voidDESCUENTO(unsigned int ARTICULOS,float PRECIO);
void PRESENTA(unsigned int ARTIC,float TOTAL,float DESCUEN);
void main()
{
unsigned int NUMARTI;
float PRELISTA;
clrscr();
gotoxy(20,10);printf("Danumero de articulos ");
scanf("%u",&NUMARTI);
gotoxy(20,12);printf("Cual es el precio ");
scanf("%f",&PRELISTA);
DESCUENTO(NUMARTI,PRELISTA);
}
void DESCUENTO(unsigned int ARTICULOS,floatPRECIO)
{
float COSTO,DESCUENTO;
COSTO=ARTICULOS*PRECIO;
DESCUENTO=0;
if(ARTICULOS >=200)
{
DESCUENTO=COSTO*0.25;
COSTO-=DESCUENTO;
}
PRESENTA(ARTICULOS,COSTO,DESCUENTO);
}
voidPRESENTA(unsigned int ARTIC,float TOTAL,float DESCUEN)
{
clrscr();
gotoxy(20,10);printf("Articulos %3u",ARTIC);
gotoxy(20,12);printf("Costo venta %4.2f ",TOTAL);gotoxy(20,14);printf("Descuento %4.2f ",DESCUEN);
gotoxy(20,16);printf("Pulsa cualquier tecla");
getche();
clrscr();
}

//Programa Recluta.cpp Acepta o rechaza reclutas
# include "stdio.h"
# include "conio.h"
#include "math.h"
# include "dos.h"
# include "iostream.h"
# include "iomanip.h"
# include "process.h"

void DECISION (unsigned short Edad, char Sexo);
void SALIDA (unsigned short edad,char sexo, char *Solicitud) ;
void main( )
{
unsigned short Edad;
char Sexo;
clrscr();
gotoxy(20,8); cout Edad;
gotoxy(20,12);printf("Sexo del solicitante (F) o (M) ");
cin >> Sexo;DECISION (Edad, Sexo);
}
void DECISION(unsigned short Edad, char Sexo)
{
char *Solicitud[10];
if (Edad>=18 && Sexo =='M')
{
*Solicitud ="Aceptado";
}
else
{
*Solicitud ="Rechazado";}
SALIDA (Edad, Sexo, *Solicitud);
}
void SALIDA (unsigned short edad, char sexo, char *Solicitud)
{
clrscr();
gotoxy(20,8);printf("SERVICIO MILITAR NACIONAL");
gotoxy(32,10);cout
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Programas en c#
  • Programa c#
  • PROGRAMAR EN C
  • C++ Programas De C++
  • Programas en c++
  • programa en c++
  • Programas c#
  • programas en c

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS