SlideShare una empresa de Scribd logo
A,a,B,b


#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    char abecedario [1][1][2][14];
    printf("letras mayusculas del alfabeton");
    int R,C,R1,C1;


    for(R=0;R<1; R++)
    {
    for(C=0;C<1;C++)
    {
    for(R1=0; R1<2; R1++)
    {
    for(C1=0; C1<14; C1++)
    {
    fflush(stdin);
    printf("n teclee el abecedario:[%d][%d][%d][%d]: n",R,C,R1,C1);
    scanf("%c",&abecedario[R][C][R1][C1]);
    fflush(stdin);

}
}
}
}

printf("n");

printf("abecedario: n",R,C,R1,C1);




for(R=0; R<1; R++)
{
for(C=0; C<1
; C++)
{
for(R1=0; R1<2; R1++)
{
for(C1=0; C1<14; C1++)
{

}
}
}
}
printf("%c",abecedario[R][C][R1][C1]);

    system("PAUSE");
    return 0;
}


Abecedario
#include <iostream>
#include <stdio.h>

using namespace std;


int main()
{

char abecedario[2][2][28][1];
char R,C,R1,C1;

printf("abecedario[PRIMERA][SEGUNDA][TERCERA][CUARTA]n");

for   (R=0; R<2; R++)
{
for   (C=0; C<2; C++)
{
for   (R1=0; R1<28; R1++)
{
for   (C1=0; C1<1; C1++)
}
}

printf("abecedario[%c][%c][%c][%c]: n",R,C,R1,C1);
scanf("%c",&abecedario[R][C][R1][C1]);
}
printf("n");
}
}
for (R=0; R<1; R++)
{
for (C=0; C<1; C++)
{
for (R1=0; R1<1; R1++)
{
for (C1=0; C1<1; C1++)
printf("%c",abecedario[R][C][R1][C1]);
}
printf("n");
}
}




system ("PAUSE");
return 0;
}




Arreglo Unidimensional


#include <iostream> /* LIBRERIAS*/
#include <stdio.h>

int main() /* FUNCION FUENTE*/


{
int suma[5];
int J;

for (J=0; J<=4; J++);
{
printf("el valor de [%d]",J+1);
scanf("%d",&suma[J]);
}

suma[5] = suma [2]+ suma[3];
        printf("el valor de [5] [%d]",suma [5]);




 system ("pause");
 return 0;
}

Arreglo

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



int main();

{
int Numeros[4][5]; int Ren,Col;
printf("nLEE E IMPRIME NUMEROS EN UNA MATRIZn");
for (Ren=0; Ren<=3; Ren++)
{
for (Col=0; Col<=4; Col++)
{
printf("TECLEE EL VALOR [%d][%d]: ",Ren,Col); Scanf("%d",&Numeros[Ren][Col]);
}
}
printf(" M A T R I Znn");
for (Ren=0; Ren<=3; Ren++)
{
for (Col=0; Col<=4; Col++)
{
printf("%5d ",Numeros[Ren][Col]);
}
printf("n");
}
printf("nPRESIONE <Intro> PARA CONTINUAR..."); fflush(stdin); getchar();
}


Arreglo Tridimencional


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

using namespace std;


int main()
{
int Numeros[4][5][5]; int Pri,Ren,Col;
printf("nLEE NUMEROS EN UN ARREGLO TRIDIMENSIONALn");
printf(" Y LOS IMPRIME EN LA PANTALLAn"); printf("NUMEROS[PRIMERA][SEGUNDA]
[TERCERA]n");
for (Pri=0; Pri<4; Pri++)
{
for (Ren=0; Ren<5; Ren++)
{
for (Col=0; Col<5; Col++)
{
printf("NUMERO[%d][%d][%d]: ",Pri,Ren,Col); scanf("%d",&Numeros[Pri][Ren][Col]);
}
printf("n");
}
}
for (Pri=0; Pri<4; Pri++)
{
printf("nn------------MATRIZ %d ------------n",Pri);
for (Ren=0; Ren<5; Ren++)
{
for (Col=0; Col<5; Col++)
{
printf("%4d ",Numeros[Pri][Ren][Col]);
}
printf("n");
}
}
printf("nPRESIONE <Intro> PARA CONTINUAR..."); fflush(stdin); getchar();
system ("pause");
return 0;
}

Arreglo


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

using namespace std;

int main   ()

{

    char vocales [10] ={'a','e','i','o','u','A','E','I','O','U'};

    int Rangos[6][2]= {1,10,
                      11,20,
                      21,30,
                      31,40,
                      41,50,
                      51,60};

    float Z[10]={12.5,3.25,1.5,34.67,7.6,4.0,89.6,4.5,9.0,19.5};
    int R,C;
    printf ("n Inicia arreglos con valores especificos n");
    printf ("-------------------- nn");

    printf ("Arreglo iniciado de vocales n n");
    for (R=0; R<10; R++)
    printf ("%c,",vocales[R]);

    printf("nn Arreglo inciado de Rangos nn");
    for (R=0; R<6; R++)
    {
    for (C=0; C<2;C++)
printf ("%3d",Rangos [R][C]);
     printf("n");
     }
     printf("n n Arreglo inciado de numeros reales n n");
     for(R=0; R<10; R++)
     printf("%5.2f",Z[R]);
     printf("n n");

     system("PAUSE");
     return 0;
}

Auto y responsables


#include <iostream>
#include <cstdlib>

using namespace std;

int main()
{

    char car[2][2];
    int own [2][2];
    int R,C,R1,C1;

    for(R=0;R<=1;R++)
    {
    for(C=0;C<=1;C++)
    {
    printf("nCual es la marca del auto? [%c][%c]:",R,C);
    scanf("%c",&car[R][C]);
    }
    }
    for(R1=0; R1<=1; R1++)
    {
    for(C1=0;C1<=1;C1++)
    {
    printf("Numero de Responssable [%d][%d]:",R1,C1);
    scanf("%d",&own[R1][C1]);
    }
    }

 system ("pause");
 return 0;
 }

Perro


#include <iostream>


using namespace std;


     class
     {
             public :
                    perro (int initialAge);
                    ~perro();
                    int GetAge ()
{
                       return itsAge;
                       }
                       void SetAge (int age)
                       {
                            itsAge = age;
                            }
                            void Ladra ()
                            {
                                 cout <<"Guau Guau... n";
                                 }

                                 private:
                                         int itsAge;
                                         };


Practica final

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



int main()
{
    char alfabeto [1][2][4][7];
    printf("letras mayusculas del alfabeton");
    int re,ce,r,c;
    for(re=0;re<1;re++)
    {
                     for(ce=0;ce<2;ce++)
                     {
                                      for(r=0;r<4;r++)
                                       {
                                                       for(c=0;c<7;c++)
                                                       {
                                                            printf("introdusca
las letras del alfaveto[%d][%d][%d][%d] : n",re,ce,r,c);
                                                            scanf("%c",&alfabeto
[re][ce][r][c]);
                                                           fflush(stdin);
                                                            }
                                                              }
                                                              }
                                                              }

                                                                    printf(" n");
                                                                    printf("las letras
en el alfabeto son : n");

for(re=0;re<=1;re++)
    {
                       for(ce=0;ce<2;ce++)
                       {
                                        for(r=0;r<4;r++)
                                         {
                                                           for(c=0;c<7;c++)
                                                           {

printf("%c",alfabeto[re][ce][r][c]);

                                                                }
                                                                 }
}
                                                                }

    system("PAUSE");
    return EXIT_SUCCESS;
}


Practica Perro


#include "Perro.hpp"

perro::perro (int initialAge)
{
             itsAge= initialAge;
             }
             perro::~perro()
             {
                             cout<<"objeto destruido"<< endl;
                             }


int main ()
{
    bool test = false;
    perro Canelo (5);
    Canelo.Ladra();
    cout<<"Canelo es un perro cuya edad es:";
    cout<<Canelo.GetAge ()<< "añosn";

    Canelo.Ladra ();
    Canelo.SetAge (7);
    cout<<"Ahora Canelo tiene";
    cout<<Canelo.GetAge()<<"añosn n";

    system ("PAUSE");
    return 0;
}


Prueba


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

using namespace std;


int main()
{

int Numeros[4][5][5]; int Pri,Ren,Col;
printf("nLEE NUMEROS EN UN ARREGLO TRIDIMENSIONALn");
printf(" Y LOS IMPRIME EN LA PANTALLAn"); printf("NUMEROS[PRIMERA][SEGUNDA]
[TERCERA]n");
for (Pri=0; Pri<4; Pri++)
{
for (Ren=0; Ren<5; Ren++)
{
for (Col=0; Col<5; Col++)
{
printf("NUMERO[%d][%d][%d]: ",Pri,Ren,Col); scanf("%d",&Numeros[Pri][Ren][Col]);
}
printf("n");
}
}
for (Pri=0; Pri<4; Pri++)
{
printf("nn------------MATRIZ %d ------------n",Pri);
for (Ren=0; Ren<5; Ren++)
{
for (Col=0; Col<5; Col++)
{
printf("%4d ",Numeros[Pri][Ren][Col]);
}
printf("n");
}
}

system ("PAUSE");
return 0;
}


Taller mecanico

#include <cstdlib>
#include <iostream>

using namespace std;

int main()
{
    char aut[2][2];
    int responsable[2][2];
    int R,C,R1,C1;

    printf("matriz de taller");

    for(R=0;R<2; R++)
    {
    for(C=0;C<2;C++)
    {
    printf("n cual es el aut?[%c][%c]:",R,C);
    scanf("%c",&aut[R][C]);
}
}

                              for(R1=0;R1<2;R1++)
                              {
                              for(C1=0;C1<2;C1++)
                              {
                              printf("n numero de responsable[%d][%d]:",R1,C1);
                              scanf("%d",&responsable[R1][C1]);
                              }
                              }



    system("PAUSE");
    return 0;
}


Tridimencional    (suma, divicion,resta y promedio)
#include <stdio.h>
#include <iostream>

using namespace std;

int main()
{
    int numeros [4][5][5];
    int sum, res, mul;
    {
    for (sum=0; sum<4; sum++)
    {
        for (res=0, res<5, res++)
        {
            for (mul=0, mul<5, mul++)
            {

    printf("n teclee los valores [%d] n");
    scanf ("%d",&numeros[sum][res][mul]);
}

numeros[4][5][5]= numeros[4][5][5]+ numeros [4][5][5];
printf ("el valor de numeros [4][5][5] [%d]", numeros [4][5][5];




    system("PAUSE");
    return 0;
}

Más contenido relacionado

DOCX
Practicas segundo parcial de programacion avanzada
DOCX
Codigos de programas
PDF
08 strings o cadenas
DOCX
Practicas de programacion 11 20
DOCX
Programa en c de listas
TXT
PROBLEMAS DE POGRAMACION 1
DOCX
Deber de programación
DOCX
Suma y multiplicacion
Practicas segundo parcial de programacion avanzada
Codigos de programas
08 strings o cadenas
Practicas de programacion 11 20
Programa en c de listas
PROBLEMAS DE POGRAMACION 1
Deber de programación
Suma y multiplicacion

La actualidad más candente (18)

DOCX
Programa 3
TXT
Ejercicios if en c#
PDF
Ejercicios de programación en C (Estructuras condicionales-Selectivas)
DOCX
Instrucciones(raptor, java, c#)
PDF
Series Infinitas Convergentes y Divergentes en Geogebra CAS
PDF
1 er informe
PDF
ESTRUCTURAS DE CONTROL: BUCLES EN C++
DOCX
Programaswin32c++
PDF
Codificaciones c++
PDF
Codificaciones c++2011
PPTX
Apunfun1
DOCX
DOCX
DOCX
Algorimos básicos para cifrar y descifrar en C# (encriptar y desencriptar)
PPTX
Unidad vi esp parte 2 procesimientos en plsql y transact sql
PPTX
Apuntes apuntadores 1 a
TXT
Deber funciones-numero-1
PPT
PresentacióN 4
Programa 3
Ejercicios if en c#
Ejercicios de programación en C (Estructuras condicionales-Selectivas)
Instrucciones(raptor, java, c#)
Series Infinitas Convergentes y Divergentes en Geogebra CAS
1 er informe
ESTRUCTURAS DE CONTROL: BUCLES EN C++
Programaswin32c++
Codificaciones c++
Codificaciones c++2011
Apunfun1
Algorimos básicos para cifrar y descifrar en C# (encriptar y desencriptar)
Unidad vi esp parte 2 procesimientos en plsql y transact sql
Apuntes apuntadores 1 a
Deber funciones-numero-1
PresentacióN 4
Publicidad

Destacado (12)

PPS
ZIP
Presentacion musica
PDF
Prototype one v1.0sm
DOCX
Codigos de programas
DOCX
Codigos de programas
PDF
Presentación investen 2015
PDF
Desiring Ecologies: Meaning-Making in the Network Wilderness
PDF
Scala Higher Order Functions
PDF
Taxonomy for App Makers
TXT
Practicas c++
PPTX
presentation on LIC company
PDF
Information Design: Coherent Concepts for Connected Ecologies
Presentacion musica
Prototype one v1.0sm
Codigos de programas
Codigos de programas
Presentación investen 2015
Desiring Ecologies: Meaning-Making in the Network Wilderness
Scala Higher Order Functions
Taxonomy for App Makers
Practicas c++
presentation on LIC company
Information Design: Coherent Concepts for Connected Ecologies
Publicidad

Similar a Practicas c++ (20)

DOCX
Include
PPT
Cadenas y punteros.ppt
DOC
Ejemplos de algoritmos en C básicos (aprendiendo a programar)
DOCX
Ejemplos java
DOCX
Corridas de los ejercicios ya realizados
DOCX
Rubenmajano
PPTX
Algoritmos Secuenciales
DOCX
PDF
1... conversor de bases
PDF
Laboratorio1 entrada-salida de datos / Lenguance C
DOCX
Ejerciciosprogramacion
PDF
ESTRUCTURAS ARRAYS Y DATOS C++
DOCX
Estructura de datos
PPTX
Universidad técnica de ambato
DOCX
Ejercicios de programación.
DOCX
Tra 130315111309-phpapp02
DOCX
algoritmos y Programacion
DOCX
DOCX
Eliminacion Gaussiana en C
Include
Cadenas y punteros.ppt
Ejemplos de algoritmos en C básicos (aprendiendo a programar)
Ejemplos java
Corridas de los ejercicios ya realizados
Rubenmajano
Algoritmos Secuenciales
1... conversor de bases
Laboratorio1 entrada-salida de datos / Lenguance C
Ejerciciosprogramacion
ESTRUCTURAS ARRAYS Y DATOS C++
Estructura de datos
Universidad técnica de ambato
Ejercicios de programación.
Tra 130315111309-phpapp02
algoritmos y Programacion
Eliminacion Gaussiana en C

Practicas c++

  • 1. A,a,B,b #include <cstdlib> #include <iostream> using namespace std; int main() { char abecedario [1][1][2][14]; printf("letras mayusculas del alfabeton"); int R,C,R1,C1; for(R=0;R<1; R++) { for(C=0;C<1;C++) { for(R1=0; R1<2; R1++) { for(C1=0; C1<14; C1++) { fflush(stdin); printf("n teclee el abecedario:[%d][%d][%d][%d]: n",R,C,R1,C1); scanf("%c",&abecedario[R][C][R1][C1]); fflush(stdin); } } } } printf("n"); printf("abecedario: n",R,C,R1,C1); for(R=0; R<1; R++) { for(C=0; C<1 ; C++) { for(R1=0; R1<2; R1++) { for(C1=0; C1<14; C1++) { } } } } printf("%c",abecedario[R][C][R1][C1]); system("PAUSE"); return 0; } Abecedario
  • 2. #include <iostream> #include <stdio.h> using namespace std; int main() { char abecedario[2][2][28][1]; char R,C,R1,C1; printf("abecedario[PRIMERA][SEGUNDA][TERCERA][CUARTA]n"); for (R=0; R<2; R++) { for (C=0; C<2; C++) { for (R1=0; R1<28; R1++) { for (C1=0; C1<1; C1++) } } printf("abecedario[%c][%c][%c][%c]: n",R,C,R1,C1); scanf("%c",&abecedario[R][C][R1][C1]); } printf("n"); } } for (R=0; R<1; R++) { for (C=0; C<1; C++) { for (R1=0; R1<1; R1++) { for (C1=0; C1<1; C1++) printf("%c",abecedario[R][C][R1][C1]); } printf("n"); } } system ("PAUSE"); return 0; } Arreglo Unidimensional #include <iostream> /* LIBRERIAS*/ #include <stdio.h> int main() /* FUNCION FUENTE*/ {
  • 3. int suma[5]; int J; for (J=0; J<=4; J++); { printf("el valor de [%d]",J+1); scanf("%d",&suma[J]); } suma[5] = suma [2]+ suma[3]; printf("el valor de [5] [%d]",suma [5]); system ("pause"); return 0; } Arreglo #include <stdio.h> #include <iostream> int main(); { int Numeros[4][5]; int Ren,Col; printf("nLEE E IMPRIME NUMEROS EN UNA MATRIZn"); for (Ren=0; Ren<=3; Ren++) { for (Col=0; Col<=4; Col++) { printf("TECLEE EL VALOR [%d][%d]: ",Ren,Col); Scanf("%d",&Numeros[Ren][Col]); } } printf(" M A T R I Znn"); for (Ren=0; Ren<=3; Ren++) { for (Col=0; Col<=4; Col++) { printf("%5d ",Numeros[Ren][Col]); } printf("n"); } printf("nPRESIONE <Intro> PARA CONTINUAR..."); fflush(stdin); getchar(); } Arreglo Tridimencional #include <iostream> #include <stdio.h> using namespace std; int main() { int Numeros[4][5][5]; int Pri,Ren,Col; printf("nLEE NUMEROS EN UN ARREGLO TRIDIMENSIONALn");
  • 4. printf(" Y LOS IMPRIME EN LA PANTALLAn"); printf("NUMEROS[PRIMERA][SEGUNDA] [TERCERA]n"); for (Pri=0; Pri<4; Pri++) { for (Ren=0; Ren<5; Ren++) { for (Col=0; Col<5; Col++) { printf("NUMERO[%d][%d][%d]: ",Pri,Ren,Col); scanf("%d",&Numeros[Pri][Ren][Col]); } printf("n"); } } for (Pri=0; Pri<4; Pri++) { printf("nn------------MATRIZ %d ------------n",Pri); for (Ren=0; Ren<5; Ren++) { for (Col=0; Col<5; Col++) { printf("%4d ",Numeros[Pri][Ren][Col]); } printf("n"); } } printf("nPRESIONE <Intro> PARA CONTINUAR..."); fflush(stdin); getchar(); system ("pause"); return 0; } Arreglo #include <stdio.h> #include <iostream> using namespace std; int main () { char vocales [10] ={'a','e','i','o','u','A','E','I','O','U'}; int Rangos[6][2]= {1,10, 11,20, 21,30, 31,40, 41,50, 51,60}; float Z[10]={12.5,3.25,1.5,34.67,7.6,4.0,89.6,4.5,9.0,19.5}; int R,C; printf ("n Inicia arreglos con valores especificos n"); printf ("-------------------- nn"); printf ("Arreglo iniciado de vocales n n"); for (R=0; R<10; R++) printf ("%c,",vocales[R]); printf("nn Arreglo inciado de Rangos nn"); for (R=0; R<6; R++) { for (C=0; C<2;C++)
  • 5. printf ("%3d",Rangos [R][C]); printf("n"); } printf("n n Arreglo inciado de numeros reales n n"); for(R=0; R<10; R++) printf("%5.2f",Z[R]); printf("n n"); system("PAUSE"); return 0; } Auto y responsables #include <iostream> #include <cstdlib> using namespace std; int main() { char car[2][2]; int own [2][2]; int R,C,R1,C1; for(R=0;R<=1;R++) { for(C=0;C<=1;C++) { printf("nCual es la marca del auto? [%c][%c]:",R,C); scanf("%c",&car[R][C]); } } for(R1=0; R1<=1; R1++) { for(C1=0;C1<=1;C1++) { printf("Numero de Responssable [%d][%d]:",R1,C1); scanf("%d",&own[R1][C1]); } } system ("pause"); return 0; } Perro #include <iostream> using namespace std; class { public : perro (int initialAge); ~perro(); int GetAge ()
  • 6. { return itsAge; } void SetAge (int age) { itsAge = age; } void Ladra () { cout <<"Guau Guau... n"; } private: int itsAge; }; Practica final #include <stdlib.h> #include <iostream> int main() { char alfabeto [1][2][4][7]; printf("letras mayusculas del alfabeton"); int re,ce,r,c; for(re=0;re<1;re++) { for(ce=0;ce<2;ce++) { for(r=0;r<4;r++) { for(c=0;c<7;c++) { printf("introdusca las letras del alfaveto[%d][%d][%d][%d] : n",re,ce,r,c); scanf("%c",&alfabeto [re][ce][r][c]); fflush(stdin); } } } } printf(" n"); printf("las letras en el alfabeto son : n"); for(re=0;re<=1;re++) { for(ce=0;ce<2;ce++) { for(r=0;r<4;r++) { for(c=0;c<7;c++) { printf("%c",alfabeto[re][ce][r][c]); } }
  • 7. } } system("PAUSE"); return EXIT_SUCCESS; } Practica Perro #include "Perro.hpp" perro::perro (int initialAge) { itsAge= initialAge; } perro::~perro() { cout<<"objeto destruido"<< endl; } int main () { bool test = false; perro Canelo (5); Canelo.Ladra(); cout<<"Canelo es un perro cuya edad es:"; cout<<Canelo.GetAge ()<< "añosn"; Canelo.Ladra (); Canelo.SetAge (7); cout<<"Ahora Canelo tiene"; cout<<Canelo.GetAge()<<"añosn n"; system ("PAUSE"); return 0; } Prueba #include <iostream> #include <stdio.h> using namespace std; int main() { int Numeros[4][5][5]; int Pri,Ren,Col; printf("nLEE NUMEROS EN UN ARREGLO TRIDIMENSIONALn"); printf(" Y LOS IMPRIME EN LA PANTALLAn"); printf("NUMEROS[PRIMERA][SEGUNDA] [TERCERA]n"); for (Pri=0; Pri<4; Pri++) { for (Ren=0; Ren<5; Ren++) { for (Col=0; Col<5; Col++) { printf("NUMERO[%d][%d][%d]: ",Pri,Ren,Col); scanf("%d",&Numeros[Pri][Ren][Col]);
  • 8. } printf("n"); } } for (Pri=0; Pri<4; Pri++) { printf("nn------------MATRIZ %d ------------n",Pri); for (Ren=0; Ren<5; Ren++) { for (Col=0; Col<5; Col++) { printf("%4d ",Numeros[Pri][Ren][Col]); } printf("n"); } } system ("PAUSE"); return 0; } Taller mecanico #include <cstdlib> #include <iostream> using namespace std; int main() { char aut[2][2]; int responsable[2][2]; int R,C,R1,C1; printf("matriz de taller"); for(R=0;R<2; R++) { for(C=0;C<2;C++) { printf("n cual es el aut?[%c][%c]:",R,C); scanf("%c",&aut[R][C]); } } for(R1=0;R1<2;R1++) { for(C1=0;C1<2;C1++) { printf("n numero de responsable[%d][%d]:",R1,C1); scanf("%d",&responsable[R1][C1]); } } system("PAUSE"); return 0; } Tridimencional (suma, divicion,resta y promedio)
  • 9. #include <stdio.h> #include <iostream> using namespace std; int main() { int numeros [4][5][5]; int sum, res, mul; { for (sum=0; sum<4; sum++) { for (res=0, res<5, res++) { for (mul=0, mul<5, mul++) { printf("n teclee los valores [%d] n"); scanf ("%d",&numeros[sum][res][mul]); } numeros[4][5][5]= numeros[4][5][5]+ numeros [4][5][5]; printf ("el valor de numeros [4][5][5] [%d]", numeros [4][5][5]; system("PAUSE"); return 0; }