Home   Artículos   Recursos   Foros   
Artíclos recientes publicados en Latindevelopers:

Visual C++: NSDoubleEdit: Un control para el manejo de números decimales en Visual C++.
Visual C++: Implementando una Calculadora en Visual C++
Visual C++: CCommandLine: Una clase para el uso de la linea de comando
Visual C++: Una clase para el manejo del Registro


AYUDAAAAAAAAAAA!!!!!!!!!!!!!

Preguntas y respuestas sobre el lenguaje de programacion C/C++

AYUDAAAAAAAAAAA!!!!!!!!!!!!!

Notapor pretty_girl el Mié Dic 07, 2005 10:06 pm

l programa debe tener portadada.
Realizar un programa q pida 10 nombre y los muestre en la pantalla de la siguiente forma
1.Jose garcia lopez
2......
3.....
4.....
5.....
6....
7....
8....
9....
10....
El menu q contenga lo siguiente>

1. identificar una vocal(q me la ponga de otro color)
2.convertir a mayuscula la letra "a". o (alreves)
3.Indicar cuantas letras con "E" hay.
4. Ponerlas las letras minusculas a mayusculas.
5.salir

PORFAVOR AYUDA URGENTE!!!

ESCRIBANME A TUDULCECOMPANIA89@HOTMAIL.COM
pretty_girl
Novato
Novato
 
Mensajes: 5
Registrado: Vie Nov 04, 2005 9:30 pm

Solucion en 200 Lineas de Codigo

Notapor AnonimeX el Jue Ene 05, 2006 3:21 pm

/*
Asunto:
AYUDAAAAAAAAAAA!!!!!!!!!!!!!
--------------------------------------------------------------------------------
l programa debe tener portadada.
Realizar un programa q pida 10 nombre y los muestre en la pantalla de la siguiente forma
1.Jose garcia lopez
9....
10....
El menu q contenga lo siguiente>

1. identificar una vocal(q me la ponga de otro color)
2. convertir a mayuscula la letra "a". o (alreves)
3. Indicar cuantas letras con "E" hay.
4. Ponerlas las letras minusculas a mayusculas.
5.salir
------------------------------------------------------
Program 02 : adivina
Writed for : AsesinoX
From : Finesi - 2006
------------------------------------------------------ */
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <string.h>
#include <ctype.h>
//------------------
#define CONTAR 1
#define NORMAL 0
//------------------
void bpPutxy( int x, int y, char * str, int Color=WHITE );
void bpPutAttr( int x, int y, char * str, char Attr=0 ,int Color=WHITE );
void bpAlternStr( int x, int y, char * str, char Atlt=0, int Color=WHITE, int Param=NORMAL );
//------------------
int bpIsVocal( char Byte )
{
char nByte = tolower(Byte);
if( nByte=='a' ) return 1;
if( nByte=='e' ) return 1;
if( nByte=='i' ) return 1;
if( nByte=='o' ) return 1;
if( nByte=='u' ) return 1;
return 0;
}
//------------------
void bpPutxy( int x, int y, char * str, int Color )
{
textcolor( Color );
gotoxy ( x,y );
cprintf( str );
};
//------------------
void bpPutAttr( int x, int y, char * str, char Attr ,int Color )
{
gotoxy ( x,y );
for( int i=0; i<strlen(str);i++ )
{
if( ! Attr )
{
if( isdigit( str[i] )==2 )
{
textcolor( 11 );
cprintf( "%c%c" , str[i], str[i+1] ); i++;
continue;
}
}
else if( bpIsVocal( str[i] ) )
{
textcolor( 12 ),
cprintf( "%c" , str[i] );
continue;
}
textcolor( Color );
cprintf( "%c" , str[i] );
}
};
//----------------------------------
void bpAlternStr( int x, int y, char * str, char Atlt, int Color, int Param )
{
int Cont=0;
gotoxy ( x,y );
for( int i=0; i<strlen(str);i++ )
{
if( tolower(Atlt) == tolower(str[i]) )
{
textcolor( 12 );
if( Param==NORMAL ) cprintf( "%c", islower(str[i])?toupper(str[i]):tolower(str[i]) );
else cprintf( "%c", str[i] );
Cont++;continue;
}
textcolor( Color );
cprintf( "%c", str[i] );
}
textcolor( Color+2 );
if( Param==CONTAR )
gotoxy( x+26,y ),
cprintf( "'%c' %d Veces", Atlt, Cont );

};
//------------------
void bpAlternStrEx( int x, int y, char * str, int Color )
{
gotoxy ( x,y );
textcolor( Color );
for( int i=0; i<strlen(str);i++ )
cprintf( "%c", islower(str[i])? toupper(str[i]) : tolower(str[i]) );
}
//------------------
void bpIniciar( )
{
textattr( 15 | BLACK*16 );
clrscr();
};
//------------------
void bpPortada( )
{
textattr( 14 | BLUE*16 );
window( 20,8,60,18 );
clrscr();

bpPutxy( 1, 2, "ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Micronix ¸ Soft." );
bpPutxy( 20, 5, "Mini Programa", LIGHTCYAN+BLINK );
bpPutxy( 33,11, "AsesinoX", YELLOW );

sleep( 2 );

textattr( 15 );
window( 1,1,80,25 );
clrscr();

};
//------------------
void bpPrograma( )
{
//.
char *lpMatrix[] =
{
"Jose Garcia Lopez",
"Mendel Elaver Oscco",
"Dennies Ritchie",
"Bryan Kernigan",
"Bjarne Strustroup",
"Ken Thompson",
"Paul Allen",
"Fredy Villasante",
"Linus Torvalds",
"Herbert Schildt",
};

int MrcFil=10, MrcCol=20, Ind;
char iOpc;

do{
clrscr();
bpPutAttr( MrcCol, MrcFil+0 , "1. Identificar Vocales" );
bpPutAttr( MrcCol, MrcFil+1 , "2. Alterna Letra 'A'" );
bpPutAttr( MrcCol, MrcFil+2 , "3. Contar Letra 'E'" );
bpPutAttr( MrcCol, MrcFil+3 , "4. Alternar May/Min" );
bpPutAttr( MrcCol, MrcFil+4 , "5. Salir" );

iOpc = getch();
clrscr( );
switch( iOpc )
{
case '1' :
for( Ind=0; Ind<10;Ind++ )
bpPutAttr( MrcCol, MrcFil+Ind, lpMatrix[Ind], 1, 9 );
getch();
break;
case '2' :
char Vocal[]={'a','e','i','o','u'};
for( int I=0; I<5;I++ )
{
for( Ind=0; Ind<10;Ind++ )
bpAlternStr( MrcCol, MrcFil+Ind, lpMatrix[Ind], Vocal[I], 9 );
getch();
}
break;
case '3' :
for( Ind=0; Ind<10;Ind++ )
bpAlternStr( MrcCol, MrcFil+Ind, lpMatrix[Ind], 'e', 2 , CONTAR );
getch();
break;
case '4' :
for( Ind=0; Ind<10;Ind++ )
bpAlternStrEx( MrcCol, MrcFil+Ind, lpMatrix[Ind], 14 );
getch();
break;
}
}while( iOpc != '5' );

};
//------------------
int main( )
{
bpIniciar( );
bpPortada( );
bpPrograma( );
return 0; // ANSI C
}
AnonimeX
Novato
Novato
 
Mensajes: 17
Registrado: Lun Abr 18, 2005 6:10 pm


Volver a C/C++

¿Quién está conectado?

Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 0 invitados