elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Ingresar Registrarse
07 Septiembre 2008, 10:11  



+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  Ejercicios (Moderador: soplo)
| | | |-+  CREAR UNA PERSONA EN [C++]
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Imprimir
Autor Tema: CREAR UNA PERSONA EN [C++]  (Leído 939 veces)
Save!~.

Desconectado Desconectado

Mensajes: 5


www.kinfer.cl.kz


Ver Perfil WWW
CREAR UNA PERSONA EN [C++]
« en: 05 Mayo 2008, 18:05 »

Construya un programa en C que permita crear el retrato hablado de un individuo
considerando que el usuario ingresa las siguientes opciones:
• Alto de la figura, es decir, ingresa la estatura que debe tener el dibujo, ejm. Si ingresa
un 10 significa que la altura desde los hombros a la cintura, de la cintura al suelo y la
medida de los brazos debe ser de 5, es decir (10/2).
• Tipo de cabello de la figura, Peinado IIIIIIIII, despeinado @@@@@@@@@ o natural
wwwwwwwww
• Con o sin lentes, con lentes I ‐ (O      O)‐ I,    sin lentes I     O      O     I
• Contento o triste, Contento \______/, triste
 _______
/            \
• Color que desea que posean el chaleco y pantalón (debe poner a disposición tres
opciones de colores para cada artículo de la vestimenta).
• El usuario debe tener la oportunidad de arrepentirse si no le gusto el retrato del individuo y volver a crear un individuo sin salir de programa.
printf ("Esta conforme con el retrato?");
printf (Ingrese 1=Conforme o 2=Desconforme);
• El usuario debe tener la oportunidad de repetir el programa sin salirse.
printf ("Desea crear otro individuo?");
printf ("Ingrese 1=si 2=no");


Algo asi tiene que quedar








Solucion:
Ya esta resuelto este ejercicio se los deje mas abajo ^^





« Última modificación: 21 Mayo 2008, 01:40 por Save!~. » En línea


Save!~.

Desconectado Desconectado

Mensajes: 5


www.kinfer.cl.kz


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #1 en: 14 Mayo 2008, 18:10 »

Editado: Abajo esta el programa completo
« Última modificación: 21 Mayo 2008, 01:41 por Save!~. » En línea


Casidiablo
Colaborador

Desconectado Desconectado

Mensajes: 2.805


Más inteligente que el simio promedio


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #2 en: 14 Mayo 2008, 18:40 »

CREAR UNA PERSONA EN [C++]??? Jugando a ser Dios???

Debes poner lo que has intentado!
En línea

Masturba tu cerebro y eyacularán tus ideas...



Visita mi blog:

Save!~.

Desconectado Desconectado

Mensajes: 5


www.kinfer.cl.kz


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #3 en: 16 Mayo 2008, 05:30 »

Editado: Abajo esta el programa completo
« Última modificación: 21 Mayo 2008, 01:42 por Save!~. » En línea


Casidiablo
Colaborador

Desconectado Desconectado

Mensajes: 2.805


Más inteligente que el simio promedio


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #4 en: 16 Mayo 2008, 18:52 »

Pero que sale??? Que error?
En línea

Masturba tu cerebro y eyacularán tus ideas...



Visita mi blog:

Save!~.

Desconectado Desconectado

Mensajes: 5


www.kinfer.cl.kz


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #5 en: 17 Mayo 2008, 20:21 »

Editado: Abajo esta el programa completo
« Última modificación: 21 Mayo 2008, 01:41 por Save!~. » En línea


barbate

Desconectado Desconectado

Mensajes: 24


Ver Perfil
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #6 en: 18 Mayo 2008, 17:39 »

Tienes que reservar mas espacio en los arrays.
En línea
barbate

Desconectado Desconectado

Mensajes: 24


Ver Perfil
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #7 en: 18 Mayo 2008, 17:45 »

tambien te falta por incluir una libreria.

s2
En línea
ArcheritONE

Desconectado Desconectado

Mensajes: 404


Estar orgulloso de Catalunya y España es posible


Ver Perfil
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #8 en: 18 Mayo 2008, 18:11 »

Instala la librería conio
En línea

Lambda

Desconectado Desconectado

Mensajes: 226



Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #9 en: 18 Mayo 2008, 18:45 »

es conio.h no conio.c ;D
En línea

GunZTracker - Codeado entero en Visual Basic 6

www.gunztracker.com

Ragnarok
Moderador Global
*****
Desconectado Desconectado

Mensajes: 4.197


Ver Perfil
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #10 en: 18 Mayo 2008, 18:55 »

No necesitas conio para nada, con poner espacios al principio de cada cadena vale.
En línea

No olvidéis leer las normas generales, además de las específicas de cada tablón.sgae, ladrones
Save!~.

Desconectado Desconectado

Mensajes: 5


www.kinfer.cl.kz


Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #11 en: 19 Mayo 2008, 05:14 »

Citar
es conio.h no conio.c
En realidad agrege unos archivos a la carpeta include del dev-c++ para ocupar esa libreria :)
El ejecutable corre con estos codigos :D

Citar
Ragnarok: "Felicidades. Publícalo si quieres pero, aparte de que este mensaje no añade nada al hilo, se salta las normas, por eso he quitado el estilo a la letra. Recuerda revisar las normas"
Disculpa, solo vi el boton de esa letra y me gusto.


Aca como lo prometi les traigo 2 codigos del mismo ejercicio.
Una es la mia y otra la de un compañero ^^ ambos estran buenos, x si alguien lo quiere realizar :D


Este es el mio
Código:
#include <conio.c>
#include <stdio.h>
int estatura, pelo, ojos, boca, chaleco, pantalon;
int control=1;
int repetir=1;
int opcion;
   
int main(){
while(repetir==1)
        {
textcolor(9); printf("\n:::::PROGRAMA PARA CREAR RETRATO DE UN INDIVIDUO:::::\n");
textcolor(10); printf("\n\n\Como es la estatura del individuo:\n");
textcolor(15); printf("1)Chico: Menor o igual a 1.50mt\n2)Mediano: Mayor a 1.50mt y menor o igual a 1.75mt\n3)Alto: Mayor a 1.75mt\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
scanf ("%d", &opcion);
while(control==1)
{
switch (opcion)
{
      case 1:
           estatura=1;
           control=0;
           break;
      case 2:
           estatura=2;
           control=0;
           break;
      case 3:
           estatura=3;
           control=0;
           break;
      default:
           textcolor(12); printf("\nERROR:");
           textcolor(15); printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\n\Como es la estatura del individuo:\n");
           textcolor(15); printf("1)Chico: Menor o igual a 1.50mt\n2)Mediano: Mayor a 1.50mt y menor o igual a 1.75mt\n3)Alto: Mayor a 1.75mt\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(10); printf("\n\nComo es el Pelo del individuo: \n");
textcolor(15); printf("1)Natural \n2)Ondulado \n3)Peinado\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
control=1;
scanf ("%d", &opcion);
while(control==1)
{
switch (opcion)
{
      case 1:
           pelo=1;
           control=0;
           break;
      case 2:
           pelo=2;
           control=0;
           break;
      case 3:
           pelo=3;
           control=0;
           break;
      default:
           textcolor(12); printf("\nERROR:");
           textcolor(15); printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\nComo es el Pelo del individuo: \n");
           textcolor(15); printf("1)Natural \n2)Ondulado \n3)Peinado\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(10); printf("\n\nEl individuo usa Lentes:");
textcolor(15); printf("\n1)No, no usa lentes \n2)Si, si usa lentes\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
scanf ("%d", &opcion);
control =1;
while(control==1)
{
switch (opcion)
{
      case 1:
           ojos=1;
           control=0;
           break;
      case 2:
           ojos=2;
           control=0;
           break;
      default:
           textcolor(12); printf("\nERROR:");
           textcolor(15); printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\nEl individuo usa Lentes:");
           textcolor(15); printf("\n1)No, no usa lentes \n2)Si, si usa lentes\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(10); printf("\n\nEstado de animo del individuo:");
textcolor(15); printf("\n1)Feliz \n2)Normal\n3)Triste\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
scanf ("%d", &opcion);
control =1;
while(control==1)
{
switch (opcion)
{
      case 1:
           boca=1;
           control=0;
           break;
      case 2:
           boca=2;
           control=0;
           break;
      case 3:
           boca=3;
           control=0;
           break;
      default:
           textcolor(12); printf("\nERROR:");
           textcolor(15); printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\nEstado de animo del individuo:");
           textcolor(15); printf("\n1)Feliz \n2)Normal\n3)Triste\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(10); printf("\n\nColor del chaleco:");
textcolor(15); printf("\n1)Rojo \n2)Verde\n3)Azul\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
scanf ("%d", &opcion);
control =1;
while(control==1)
{
switch (opcion)
{
      case 1:
           chaleco=12;
           control=0;
           break;
      case 2:
           chaleco=2;
           control=0;
           break;
      case 3:
           chaleco=1;
           control=0;
           break;
      default:
           textcolor(12); printf("\nERROR:");
           textcolor(15); printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\nColor del chaleco:");
           textcolor(15); printf("\n1)Rojo \n2)Verde\n3)Azul\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(10); printf("\n\nColor del pantalon:");
textcolor(15); printf("\n1)Azul Oscuro \n2)Azul\n3)Verde\n");
textcolor(14); printf("Respuesta:");
textcolor(15);
scanf ("%d", &opcion);
control =1;
while(control==1)
{
switch (opcion)
{
      case 1:
           pantalon=1;
           control=0;
           break;
      case 2:
           pantalon=9;
           control=0;
           break;
      case 3:
           pantalon=2;
           control=0;
           break;
      default:
           textcolor(12); printf ("\nERROR:");
           textcolor(15);printf("No existe esa opcion\nVuelva a elegir\n");   
           textcolor(10); printf("\n\nColor del pantalon:");
           textcolor(15); printf("\n1)Azul Oscuro \n2)Azul\n3)Verde\n");
           textcolor(14); printf("Respuesta:");
           textcolor(15);
           scanf ("%d", &opcion);
           break;
}
}


textcolor(9); printf("\n\n::::::::::ESTE ES EL RETRATO DE SU INDIVIDUO::::::::::\n\n");
textcolor(6);
if (pelo==1)
printf ("         WWWWWWWWWW \n");
if (pelo==2)
printf ("         @@@@@@@@@@ \n");
if(pelo==3)
printf ("         |||||||||| \n");
textcolor(7);

printf ("         |        |\n");                //imprimir frente

if (ojos==1)
printf ("        @| O   O  |@\n");
if (ojos==2)
printf ("        @|-(o)(o)-|@\n");

printf ("         |   (    |\n");                 //imprime nariz

if (boca==1)
printf ("         | \\____/ |\n");
if (boca==2)
printf ("         |  ----  |\n");
if(boca==3)
printf ("         |  ----¿ |\n");

printf ("          \\______/\n");                  //imprime pera

switch (estatura)
{
     case 1:
          {
       textcolor(chaleco); printf ("     ________"); textcolor(7); printf ("| |"); textcolor(chaleco); printf("________"); textbackground(0); printf (" \n");
       textcolor(0); textbackground(0); printf ("    "); textbackground(chaleco); printf("|         o         |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("    "); textbackground(chaleco); printf ("|         o         |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|  |       o       |  |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|  |       o       |  |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(7); printf ("  uuuu"); textcolor(0); textbackground(chaleco); printf ("|_______o_______|"); textbackground(0); textcolor(7); printf ("uuuu"); textbackground(0); printf (" \n");
       
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|_______|_______|"); textbackground(0); printf (" \n");
       textbackground(0) ;textcolor(7); printf ("       |_____| |_____|"); textbackground(0); printf (" \n\n");
       break;
       }

case 2:
{
       textcolor(chaleco); printf ("     ________"); textcolor(7); printf ("| |"); textcolor(chaleco); printf("________"); textbackground(0); printf (" \n");
       textcolor(0); textbackground(0); printf ("    "); textbackground(chaleco); printf("|         o         |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|          o          |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|  |       o       |  |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); printf (" "); textbackground(chaleco); printf ("|    |       o       |    |"); textbackground(0); printf (" \n");
       textbackground(0); printf (" "); textbackground(chaleco); printf ("|    |       o       |    |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(7); printf (" uuuu "); textcolor(0); textbackground(chaleco); printf ("I       O       I"); textbackground(0); textcolor(7); printf (" uuuu"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(chaleco); printf("|_______o_______|"); textbackground(0); printf (" \n");
       
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n"); 
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|_______|_______|"); textbackground(0); printf (" \n");
       textbackground(0) ;textcolor(7); printf ("       |_____| |_____|");  textbackground(0); printf (" \n\n");
       break;
}
case 3:
{
       textcolor(chaleco); printf ("     ________"); textcolor(7); printf ("| |"); textcolor(chaleco); printf("________"); textbackground(0); printf (" \n");
       textcolor(0); textbackground(0); printf ("    "); textbackground(chaleco); printf("|         o         |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|          o          |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("   "); textbackground(chaleco); printf ("|  |       o       |  |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); printf ("  "); textbackground(chaleco); printf ("|   |       o       |   |"); textbackground(0); printf (" \n");
       textbackground(0); printf (" "); textbackground(chaleco); printf ("|    |       o       |    |"); textbackground(0); printf (" \n");
       textbackground(0); printf (" "); textbackground(chaleco); printf ("|    |       o       |    |"); textbackground(0); printf (" \n");
       textbackground(chaleco); printf ("|     |       o       |     |"); textbackground(0); printf (" \n");
       textbackground(chaleco); printf ("|     |       o       |     |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(7); printf (" uuuu "); textcolor(0); textbackground(chaleco); printf ("|       o       |"); textbackground(0); textcolor(7); printf (" uuuu"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(chaleco); printf("|_______o_______|"); textbackground(0); printf (" \n");

       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|               |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|       |       |"); textbackground(0); printf (" \n");
       textbackground(0); textcolor(0); printf ("      "); textbackground(pantalon); printf("|_______|_______|"); textbackground(0); printf (" \n");
       textbackground(0) ;textcolor(7); printf ("       I_____I I_____I");  textbackground(0); printf (" \n\n");
       break;
}
}
       textbackground(0);
       textcolor(10); printf ("Que desea hacer ahora?:\n");
       textcolor(15); printf("Escriba 1 para repetir el programa\n");
       printf("O cualquier tecla dintinta de 1 para salir\n");
       textcolor(14); printf("Respuesta:");
       textcolor(15);
       scanf ("%i", &control);
       if (control==1)
       repetir=1;
       else
       repetir=0;
       }
       }



Este es el de mi compa:
Código:
#include <conio.c>
#include <stdlib.h>
#include <stdio.h>

char frente[25] ="     |        | ";
char ojos[25] ="     | O    O | ";
char nariz[25]="    @|   (    |@";
char triste[25] ="     | /----\\ |";
char lentes[25]="     |-(o)(o)-| ";
char contento[25]="     | \\____/ |";
char pelolais[25]="     |||||||||| ";
char pelonormal[25]="     ^^^^^^^^^^ ";
char peloondulado[25]="     @@@@@@@@@@ ";
int estatura,lente,pelo,cara;
int control=1;
int repetir=1;

int main(){
while(repetir==1)
        {
 
do {
textcolor(LIGHTGREEN);
printf("\n\n\ Ingrese Numero de la opcion de estatura que desea:\n\n");
textcolor(WHITE);
printf(" 1 CHICO:      menor o igual a 1.50mt\n 2 MEDIANO:    mayor a 1.50 y menor o igual a 1.70mt\n 3 ALTO:       mayor a 1.70mt\n\n");
printf("Su opcion elegida es: ");
scanf("%i",& estatura);
if (estatura<1 || estatura>3){
printf ("\n SOLO PUEDE INGRESAR OPCIONES DE 1 a 3\n"); }
}while (estatura<1 || estatura >3);
clrscr();
do{
         textcolor(LIGHTGREEN);
printf("\n\n\ Ingrese Numero de la opcion de pelo que desea:\n\n");
       textcolor(WHITE); 
printf(" 1 LISO \n 2 NORMAL \n 3 ONDULADO\n\n");
printf("Su opcion elegida es: ");
scanf("%i",& pelo);
if (pelo<1 || pelo>3){
printf ("\n SOLO PUEDE INGRESAR OPCIONES DE 1 a 3\n"); }
}while (pelo<1 ||  pelo>3);
clrscr();
do{
         textcolor(LIGHTGREEN);
printf("\n\n\ Ingrese numero de la opcion de ojos que desea:\n\n");
textcolor(WHITE);
printf(" 1 CON lENTES \n 2 SIN LENTES\n\n");
printf("Su opcion elegida es: ");
scanf("%i",& lente);
if (lente<1 || lente>2){
printf ("\n SOLO PUEDE INGRESAR OPCIONES DE 1 a 2\n"); }
}while (lente<1 || lente >2);
clrscr();
do{
         textcolor(LIGHTGREEN);
printf("\n\n\ Ingrese numero de la opcion de cara que desea:\n\n");
textcolor(WHITE);
printf(" 1 CONTENTO \n 2 TRISTE \n\n");
printf("Su opcion elegida es: ");
scanf("%i",& cara);
if (cara<1 || cara>2){
printf ("\n SOLO PUEDE INGRESAR OPCIONES DE 1 a 2\n"); }
}while (cara<1 ||  cara>2);
clrscr();

if (pelo==1){gotoxy(20,5);
             textcolor(YELLOW);
             cprintf("%s",pelolais);}
             {gotoxy(20,6);
             textcolor(LIGHTGRAY);
             cprintf("%s",frente);}
if (pelo==2){gotoxy(20,5);
             textcolor(YELLOW);
             cprintf("%s",pelonormal);}
             {gotoxy(20,6);
             textcolor(LIGHTGRAY);
             cprintf("%s",frente);}
if (pelo==3){gotoxy(20,5);
             textcolor(YELLOW);
             cprintf("%s",peloondulado);}
             {gotoxy(20,6);
             textcolor(LIGHTGRAY);
             cprintf("%s",frente);}
             
if  (lente==1){gotoxy(20,7);
 textcolor(LIGHTGRAY);
                cprintf("%s",lentes);
                gotoxy(20,8);
                cprintf("%s", nariz);}
if  (lente==2){gotoxy(20,7);
textcolor(LIGHTGRAY);
                cprintf("%s",ojos);
                gotoxy(20,8);
                cprintf("%s", nariz);}
if (cara==1){gotoxy(20,9);
textcolor(LIGHTGRAY);
            cprintf("%s",contento);}
if (cara==2){gotoxy(20,9);
textcolor(LIGHTGRAY);
            cprintf("%s",triste);}
           
 textcolor(LIGHTGRAY)   ;       
if(estatura==1){
    textcolor(LIGHTGRAY);
    printf("\n                         \\_    _/       ");      textcolor(RED)   ;
    printf("\n                     ______|  |_____       ");
    printf("\n                   /  |     O        \\       ");
    printf("\n                   |  |     O     |  |       ");
    printf("\n                   |  |     O     |  |       ");
    printf("\n                   |__|     O     |__|       ");
    printf("\n                   !!!|_____O_____|!!!       "); textcolor(BLUE)   ;
    printf("\n                      |           |          ");
    printf("\n                      |     |     |         ");
    printf("\n                      |     |     |         ");
    printf("\n                      |     |     |         ");
    printf("\n                      |_____|_____|        ");textcolor(BROWN)   ;
    printf("\n                       |___| |___|        ");      }                 
           
           

if(estatura==2){
       textcolor(LIGHTGRAY);         
    printf("\n                         \\_    _/       ");  textcolor(RED)   ;             
    printf("\n                     ______|  |______     ");
    printf("\n                   /                  \\ ");
    printf("\n                  |  |      O      |  | ");
    printf("\n                  |  |             |  | ");
    printf("\n                  |  |      O      |  | ");
    printf("\n                  |  |             |  | ");
    printf("\n                  |__|      O      |__| ");
    printf("\n                  !!!|_____________|!!!   "); textcolor(LIGHTBLUE)   ;
    printf("\n                     |             |               ");
    printf("\n                     |      |      |         ");
    printf("\n                     |      |      |         ");
    printf("\n                     |      |      |         ");
    printf("\n                     |______|______|        "); textcolor(BROWN)   ;
    printf("\n                      |____| |____|        ");}
   
if(estatura==3){
                  textcolor(LIGHTGRAY);         
    printf("\n                         \\_    _/       ");  textcolor(RED)   ;     
    printf("\n                   ________|  |_______     ");
    printf("\n                 /                     \\  ");
    printf("\n                 |          O          | ");
    printf("\n                 |   |             |   | ");
    printf("\n                 |   |      O      |   | ");
    printf("\n                 |   |             |   | ");
    printf("\n                 |   |      O      |   | ");
    printf("\n                 |   |             |   | ");
    printf("\n                 |___|      O      |___| ");
    printf("\n                  !!!|_____________|!!! ");   textcolor(LIGHTBLUE)   ;
    printf("\n                     |             |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |      |      |        ");
    printf("\n                     |______|______|        "); textcolor(BROWN)   ;
    printf("\n                      |____| |____|        ");
}
textcolor(WHITE);
     system("pause");
clrscr();

    textcolor(YELLOW);
    printf ("QUE OPCION DESEA REALIZAR AHORA:\n");
       textcolor(WHITE);
       printf("\n\n Ingrese:\n\n 1 Para reiniciar el programa\n 2 : para Salir de la aplicacion \n");
       scanf ("%i", &control);
       if (control==1)
       repetir=1;
       else
       repetir=0;
       clrscr();
       }
       }

« Última modificación: 21 Mayo 2008, 01:38 por Save!~. » En línea


barbate

Desconectado Desconectado

Mensajes: 24


Ver Perfil
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #12 en: 21 Mayo 2008, 16:59 »

muy bien, yo hubiera usado for apra tantas repeticiones, pero si le programa funciona... :)

un saludo
En línea
Lukhardy

Desconectado Desconectado

Mensajes: 298



Ver Perfil WWW
Re: CREAR UNA PERSONA EN [C++]
« Respuesta #13 en: 28 Mayo 2008, 07:32 »

Esta bueno esto che jajaja, y de paso me sirve para poder retomar de nuevo la practica en C (hace bastante que no lo toco).

Solo le falta bailar.... :P :P

Saludos che ;)
En línea


Páginas: [1] Ir Arriba Imprimir 
Ir a:  







Consolas     La Web de Goku     MilW0rm     MundoDivx

Hispabyte     Truzone     TodoReviews     ZonaPhotoshop

hard-h2o modding    Foros de ayuda    Yashira.org    Videojuegos    indetectables.net   

Noticias Informatica    Seguridad Informática    ADSL    Foros en español    eNYe Sec

Todas las webs afiliadas están libres de publicidad engañosa.

Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC