SlideShare a Scribd company logo
1 of 6
Darío Guevara MayorGa
                           NoMbre: DieGo velasco
                               curso:6to “D”


1._REALICE LA CORRIDA DE ESCRITORIO DEL SIGUIENTE EJERCICIO DE VECTORES
EN G++ Y LLENE LAS CASILLAS DE ABAJO QUE RESPRESENTAN LOS 2 VECTORES
RESULTANTES...
                 void main()
                 {
                       float num[10];
                                                      i   j   aux
                       float num1[10];
                       int i,int j ,int aux;          0       1
                       aux=1;                         1       2
                       aux=2;                         2
                       for (i=0;i<10;i=i+1)           3
                       {                              4
                       cout<<”salida es:”<<i<<endl;   5
                       num[i]=i;                      6
                       num1[i]=aux;                   7
                       }                              8
                       aux=aux+1;                     9
                       aux=aux+2;
                       getch();
                 }
RESPUESTA
 0      1       2        3            4      5      6   7   8     9


0       1      2       3       4      5      6      7       8      9

2._ EN LE SIGUIENTE EJERCICIO DE VECTORES EN G++ DIBUJE COMO QUEDA EL
VECTOR..
                  void main()
                                                     n i     j
                  {
                  int n[10],i,j;
                          for (i=0:i<10;i++)        0  0
                          {                         2  1
                                  if(i%2==0)        2  2
                                         n[i]=i;    4  3
                                  else              4  4
                                         n[i]=i+1;  6  5
                          }                         6  6
                          for (j=0;j<10;j++)        8  7
                                  cout<<n[j]<<endl; 8  8
                  getch();                          10 9
                  }
 0        2      2          4          4         6  6    8  8      10

3._EN LE SIGUIENTE EJERCICIO DE MATRICES EN G++. LLENA LA MATRIZ CON LOS
VALORES CORRECTOS...
              void main()                                              j
              {                                        i
              int m[5][5];                             0
              for(int j=0;j<5;j++)                     1           0
                                                       2
              {
                       for (int i=0;i<5;i++)               3
                                                           4
                       {                                   0
                                m[j][i]=j;                 1       1
                       }                                   2
                                                           3
              }                                            4
RESPUESTA:                                                 0
                                                           1
 0   0     0  0      02                                    2
                                                           3
1      1       1   1     1                                 4
2      2       2   2     2                                 0
                                                           1
3      3       3   3     3                                 2
                                                           3       3
4      4       4   4     4                                 4
                                                           0
                                                           1
                                                           2
                                                           3
                                                           4           4


4._YO YA TENGO UN VECTOR LLENADO DE LA SIGUIENTE MANERA:
 1       2      3     4      5      6      7      8      9                     10

CON EL SIGUIENTE CODIGO DE ORDENAMIENTO DE NUMEROS . DIBUJE EL VECTOR
COMO QUEDARIA..
           for (x=0;x<10-1;x++)                            Y
                                                         X
           {
                  for (y=x+1;y<10-1;y++)               0   1
                  {                                    1   2
                         if(numero2[x]>=numero2 [y])   2   3
                         {                                 4
                                aux=numero[x];             5
                                numero2[x]=numero2[y];     6
                                numero2[y]=aux;            7
                         }                                 8
                  }                                        9
           }
RESPUESTA:

1          2       3         4      5          6   7           8           9   10

5._EN EL SIGUIENTE EJERCICIO DE MATRICES EN G++. LLENE LA MATRIZ CON LOS
VALORES CORRECTOS...                     j        i
            void main()
{                                   0
                                                    1         0
                int m[5][5];                        2
                for (int j=0;j<5;j++)               3
                }                                   4
                                                    0
                         for(int i=0;i<5;i++)       1
                         {                          2
                                                          1
                           m[j][i]=i;               3
                                                    4
                         }                          0
                }                                   1     2
RESPUESTA:                                          23
                                                      4
 0   1     2              3      4                    0
                                     3                1
0       1        2        3      4                    2
                                                      3
0       1        2        3      4                    4
                                                      0
0       1        2        3      4                    1
                                  4                   2
0       1        2        3      4                    3
                                                      4
6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5
DE LA SIGUUIENTE MANERA..
            {                            i     j
                                             0
            int [5][5];                      1
            for(i=0;i<5:i++)               0 2
                    {                        3
                                             4
                    for(j=0:j<5;j++)         0
                           {                 1
                           if(i=j)       1   2
                                             3
                           matriz[][]=1;     4
                           }                 0
                    }                        1
                                          2  2
            }                                3
RESPUESTA:                                   4
                                             0
 1                   3                       1
                                                     2
    1                                                3
            1                                        4
                                                     0
                  1                                  1
                                                4    2
                         1                           3
                                                     4
{                                   0
                                                    1         0
                int m[5][5];                        2
                for (int j=0;j<5;j++)               3
                }                                   4
                                                    0
                         for(int i=0;i<5;i++)       1
                         {                          2
                                                          1
                           m[j][i]=i;               3
                                                    4
                         }                          0
                }                                   1     2
RESPUESTA:                                          23
                                                      4
 0   1     2              3      4                    0
                                     3                1
0       1        2        3      4                    2
                                                      3
0       1        2        3      4                    4
                                                      0
0       1        2        3      4                    1
                                  4                   2
0       1        2        3      4                    3
                                                      4
6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5
DE LA SIGUUIENTE MANERA..
            {                            i     j
                                             0
            int [5][5];                      1
            for(i=0;i<5:i++)               0 2
                    {                        3
                                             4
                    for(j=0:j<5;j++)         0
                           {                 1
                           if(i=j)       1   2
                                             3
                           matriz[][]=1;     4
                           }                 0
                    }                        1
                                          2  2
            }                                3
RESPUESTA:                                   4
                                             0
 1                   3                       1
                                                     2
    1                                                3
            1                                        4
                                                     0
                  1                                  1
                                                4    2
                         1                           3
                                                     4
{                                   0
                                                    1         0
                int m[5][5];                        2
                for (int j=0;j<5;j++)               3
                }                                   4
                                                    0
                         for(int i=0;i<5;i++)       1
                         {                          2
                                                          1
                           m[j][i]=i;               3
                                                    4
                         }                          0
                }                                   1     2
RESPUESTA:                                          23
                                                      4
 0   1     2              3      4                    0
                                     3                1
0       1        2        3      4                    2
                                                      3
0       1        2        3      4                    4
                                                      0
0       1        2        3      4                    1
                                  4                   2
0       1        2        3      4                    3
                                                      4
6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5
DE LA SIGUUIENTE MANERA..
            {                            i     j
                                             0
            int [5][5];                      1
            for(i=0;i<5:i++)               0 2
                    {                        3
                                             4
                    for(j=0:j<5;j++)         0
                           {                 1
                           if(i=j)       1   2
                                             3
                           matriz[][]=1;     4
                           }                 0
                    }                        1
                                          2  2
            }                                3
RESPUESTA:                                   4
                                             0
 1                   3                       1
                                                     2
    1                                                3
            1                                        4
                                                     0
                  1                                  1
                                                4    2
                         1                           3
                                                     4
{                                   0
                                                    1         0
                int m[5][5];                        2
                for (int j=0;j<5;j++)               3
                }                                   4
                                                    0
                         for(int i=0;i<5;i++)       1
                         {                          2
                                                          1
                           m[j][i]=i;               3
                                                    4
                         }                          0
                }                                   1     2
RESPUESTA:                                          23
                                                      4
 0   1     2              3      4                    0
                                     3                1
0       1        2        3      4                    2
                                                      3
0       1        2        3      4                    4
                                                      0
0       1        2        3      4                    1
                                  4                   2
0       1        2        3      4                    3
                                                      4
6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5
DE LA SIGUUIENTE MANERA..
            {                            i     j
                                             0
            int [5][5];                      1
            for(i=0;i<5:i++)               0 2
                    {                        3
                                             4
                    for(j=0:j<5;j++)         0
                           {                 1
                           if(i=j)       1   2
                                             3
                           matriz[][]=1;     4
                           }                 0
                    }                        1
                                          2  2
            }                                3
RESPUESTA:                                   4
                                             0
 1                   3                       1
                                                     2
    1                                                3
            1                                        4
                                                     0
                  1                                  1
                                                4    2
                         1                           3
                                                     4

More Related Content

What's hot

Bài tập tích phân- nguyên hàm
Bài tập tích phân- nguyên hàmBài tập tích phân- nguyên hàm
Bài tập tích phân- nguyên hàmdiemthic3
 
Hephuongtrinh bookbooming
Hephuongtrinh   bookboomingHephuongtrinh   bookbooming
Hephuongtrinh bookboomingbookbooming
 
Matran 1 bookbooming
Matran 1   bookboomingMatran 1   bookbooming
Matran 1 bookboomingbookbooming
 
Www.mathvn.com bt-mu logarit-mathvn.com
Www.mathvn.com bt-mu logarit-mathvn.comWww.mathvn.com bt-mu logarit-mathvn.com
Www.mathvn.com bt-mu logarit-mathvn.comhao5433
 
Matran 2 bookbooming
Matran 2   bookboomingMatran 2   bookbooming
Matran 2 bookboomingbookbooming
 
ứNg dụng tích phân tính diện tích và thể tích
ứNg dụng tích phân tính diện tích và thể tíchứNg dụng tích phân tính diện tích và thể tích
ứNg dụng tích phân tính diện tích và thể tíchThế Giới Tinh Hoa
 
Tema 3 (Soluciones cálculo de derivadas)
Tema 3 (Soluciones cálculo de derivadas)Tema 3 (Soluciones cálculo de derivadas)
Tema 3 (Soluciones cálculo de derivadas)jhbenito
 
Integral parsial tanzalin2
Integral parsial tanzalin2Integral parsial tanzalin2
Integral parsial tanzalin2Efuansyah Fizr
 
12X1 T02 02 integrating exponentials
12X1 T02 02 integrating exponentials12X1 T02 02 integrating exponentials
12X1 T02 02 integrating exponentialsNigel Simmons
 
Một số bài tập hàm số
Một số bài tập hàm sốMột số bài tập hàm số
Một số bài tập hàm sốtuituhoc
 
Serie1 07 08
Serie1 07 08Serie1 07 08
Serie1 07 08Ahmed Bd
 

What's hot (14)

Bài tập tích phân- nguyên hàm
Bài tập tích phân- nguyên hàmBài tập tích phân- nguyên hàm
Bài tập tích phân- nguyên hàm
 
Hephuongtrinh bookbooming
Hephuongtrinh   bookboomingHephuongtrinh   bookbooming
Hephuongtrinh bookbooming
 
Matran 1 bookbooming
Matran 1   bookboomingMatran 1   bookbooming
Matran 1 bookbooming
 
Www.mathvn.com bt-mu logarit-mathvn.com
Www.mathvn.com bt-mu logarit-mathvn.comWww.mathvn.com bt-mu logarit-mathvn.com
Www.mathvn.com bt-mu logarit-mathvn.com
 
Matran 2 bookbooming
Matran 2   bookboomingMatran 2   bookbooming
Matran 2 bookbooming
 
ứNg dụng tích phân tính diện tích và thể tích
ứNg dụng tích phân tính diện tích và thể tíchứNg dụng tích phân tính diện tích và thể tích
ứNg dụng tích phân tính diện tích và thể tích
 
Tema 3 (Soluciones cálculo de derivadas)
Tema 3 (Soluciones cálculo de derivadas)Tema 3 (Soluciones cálculo de derivadas)
Tema 3 (Soluciones cálculo de derivadas)
 
Mat1130001 Bf
Mat1130001 BfMat1130001 Bf
Mat1130001 Bf
 
Integral parsial tanzalin2
Integral parsial tanzalin2Integral parsial tanzalin2
Integral parsial tanzalin2
 
Modul 1 pd linier orde satu
Modul 1 pd linier orde satuModul 1 pd linier orde satu
Modul 1 pd linier orde satu
 
12X1 T02 02 integrating exponentials
12X1 T02 02 integrating exponentials12X1 T02 02 integrating exponentials
12X1 T02 02 integrating exponentials
 
Bài tập nguyên hàm tích phân
Bài tập nguyên hàm tích phânBài tập nguyên hàm tích phân
Bài tập nguyên hàm tích phân
 
Một số bài tập hàm số
Một số bài tập hàm sốMột số bài tập hàm số
Một số bài tập hàm số
 
Serie1 07 08
Serie1 07 08Serie1 07 08
Serie1 07 08
 

Viewers also liked

Betodeck brochure2012
Betodeck brochure2012Betodeck brochure2012
Betodeck brochure2012Rudi Dana
 
Serpientes y escalares
Serpientes y escalaresSerpientes y escalares
Serpientes y escalaresLupita Salinas
 
Correcciondellapruebademfsi 130117191639-phpapp01
Correcciondellapruebademfsi 130117191639-phpapp01Correcciondellapruebademfsi 130117191639-phpapp01
Correcciondellapruebademfsi 130117191639-phpapp01Diego Velasco
 
Article Outline Tannen's Sex, Lies, and Conversation
Article Outline Tannen's Sex, Lies, and ConversationArticle Outline Tannen's Sex, Lies, and Conversation
Article Outline Tannen's Sex, Lies, and ConversationAiden Yeh
 
O LEGADO DE PITÁGORAS E OUTROS
O LEGADO DE PITÁGORAS E OUTROSO LEGADO DE PITÁGORAS E OUTROS
O LEGADO DE PITÁGORAS E OUTROSEASYMATICA
 
Manual para trabalhos acadêmicos
Manual para trabalhos acadêmicosManual para trabalhos acadêmicos
Manual para trabalhos acadêmicosdomleandro93
 

Viewers also liked (7)

Betodeck brochure2012
Betodeck brochure2012Betodeck brochure2012
Betodeck brochure2012
 
Prinsjesdagspecial 2013 met alle wijzigingen. Verplichte kost voor iedereen!
Prinsjesdagspecial 2013 met alle wijzigingen. Verplichte kost voor iedereen!Prinsjesdagspecial 2013 met alle wijzigingen. Verplichte kost voor iedereen!
Prinsjesdagspecial 2013 met alle wijzigingen. Verplichte kost voor iedereen!
 
Serpientes y escalares
Serpientes y escalaresSerpientes y escalares
Serpientes y escalares
 
Correcciondellapruebademfsi 130117191639-phpapp01
Correcciondellapruebademfsi 130117191639-phpapp01Correcciondellapruebademfsi 130117191639-phpapp01
Correcciondellapruebademfsi 130117191639-phpapp01
 
Article Outline Tannen's Sex, Lies, and Conversation
Article Outline Tannen's Sex, Lies, and ConversationArticle Outline Tannen's Sex, Lies, and Conversation
Article Outline Tannen's Sex, Lies, and Conversation
 
O LEGADO DE PITÁGORAS E OUTROS
O LEGADO DE PITÁGORAS E OUTROSO LEGADO DE PITÁGORAS E OUTROS
O LEGADO DE PITÁGORAS E OUTROS
 
Manual para trabalhos acadêmicos
Manual para trabalhos acadêmicosManual para trabalhos acadêmicos
Manual para trabalhos acadêmicos
 

More from Diego Velasco

Deber de computacion maria
Deber de computacion mariaDeber de computacion maria
Deber de computacion mariaDiego Velasco
 
Deber de jessik mi todo
Deber de jessik mi todoDeber de jessik mi todo
Deber de jessik mi todoDiego Velasco
 
Deber de computacion vero
Deber de computacion veroDeber de computacion vero
Deber de computacion veroDiego Velasco
 
Deber de computacion
Deber de computacion Deber de computacion
Deber de computacion Diego Velasco
 
correcion de la prueba de programacion
correcion   de la prueba de programacion correcion   de la prueba de programacion
correcion de la prueba de programacion Diego Velasco
 
Cuestionario de jesiik
Cuestionario de jesiikCuestionario de jesiik
Cuestionario de jesiikDiego Velasco
 
deber de computacion
deber de computaciondeber de computacion
deber de computacionDiego Velasco
 
Cuestionario de jesiik
Cuestionario de jesiikCuestionario de jesiik
Cuestionario de jesiikDiego Velasco
 

More from Diego Velasco (11)

Deber de computacion maria
Deber de computacion mariaDeber de computacion maria
Deber de computacion maria
 
Deber de maria
Deber de  mariaDeber de  maria
Deber de maria
 
Deber de veronik
Deber de veronikDeber de veronik
Deber de veronik
 
Deber de jessik
Deber de jessik Deber de jessik
Deber de jessik
 
Deber de jessik mi todo
Deber de jessik mi todoDeber de jessik mi todo
Deber de jessik mi todo
 
Deber de computacion vero
Deber de computacion veroDeber de computacion vero
Deber de computacion vero
 
Deber de computacion
Deber de computacion Deber de computacion
Deber de computacion
 
correcion de la prueba de programacion
correcion   de la prueba de programacion correcion   de la prueba de programacion
correcion de la prueba de programacion
 
Cuestionario de jesiik
Cuestionario de jesiikCuestionario de jesiik
Cuestionario de jesiik
 
deber de computacion
deber de computaciondeber de computacion
deber de computacion
 
Cuestionario de jesiik
Cuestionario de jesiikCuestionario de jesiik
Cuestionario de jesiik
 

correccion de la prueba

  • 1. Darío Guevara MayorGa NoMbre: DieGo velasco curso:6to “D” 1._REALICE LA CORRIDA DE ESCRITORIO DEL SIGUIENTE EJERCICIO DE VECTORES EN G++ Y LLENE LAS CASILLAS DE ABAJO QUE RESPRESENTAN LOS 2 VECTORES RESULTANTES... void main() { float num[10]; i j aux float num1[10]; int i,int j ,int aux; 0 1 aux=1; 1 2 aux=2; 2 for (i=0;i<10;i=i+1) 3 { 4 cout<<”salida es:”<<i<<endl; 5 num[i]=i; 6 num1[i]=aux; 7 } 8 aux=aux+1; 9 aux=aux+2; getch(); } RESPUESTA 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 2._ EN LE SIGUIENTE EJERCICIO DE VECTORES EN G++ DIBUJE COMO QUEDA EL VECTOR.. void main() n i j { int n[10],i,j; for (i=0:i<10;i++) 0 0 { 2 1 if(i%2==0) 2 2 n[i]=i; 4 3 else 4 4 n[i]=i+1; 6 5 } 6 6 for (j=0;j<10;j++) 8 7 cout<<n[j]<<endl; 8 8 getch(); 10 9 } 0 2 2 4 4 6 6 8 8 10 3._EN LE SIGUIENTE EJERCICIO DE MATRICES EN G++. LLENA LA MATRIZ CON LOS
  • 2. VALORES CORRECTOS... void main() j { i int m[5][5]; 0 for(int j=0;j<5;j++) 1 0 2 { for (int i=0;i<5;i++) 3 4 { 0 m[j][i]=j; 1 1 } 2 3 } 4 RESPUESTA: 0 1 0 0 0 0 02 2 3 1 1 1 1 1 4 2 2 2 2 2 0 1 3 3 3 3 3 2 3 3 4 4 4 4 4 4 0 1 2 3 4 4 4._YO YA TENGO UN VECTOR LLENADO DE LA SIGUIENTE MANERA: 1 2 3 4 5 6 7 8 9 10 CON EL SIGUIENTE CODIGO DE ORDENAMIENTO DE NUMEROS . DIBUJE EL VECTOR COMO QUEDARIA.. for (x=0;x<10-1;x++) Y X { for (y=x+1;y<10-1;y++) 0 1 { 1 2 if(numero2[x]>=numero2 [y]) 2 3 { 4 aux=numero[x]; 5 numero2[x]=numero2[y]; 6 numero2[y]=aux; 7 } 8 } 9 } RESPUESTA: 1 2 3 4 5 6 7 8 9 10 5._EN EL SIGUIENTE EJERCICIO DE MATRICES EN G++. LLENE LA MATRIZ CON LOS VALORES CORRECTOS... j i void main()
  • 3. { 0 1 0 int m[5][5]; 2 for (int j=0;j<5;j++) 3 } 4 0 for(int i=0;i<5;i++) 1 { 2 1 m[j][i]=i; 3 4 } 0 } 1 2 RESPUESTA: 23 4 0 1 2 3 4 0 3 1 0 1 2 3 4 2 3 0 1 2 3 4 4 0 0 1 2 3 4 1 4 2 0 1 2 3 4 3 4 6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5 DE LA SIGUUIENTE MANERA.. { i j 0 int [5][5]; 1 for(i=0;i<5:i++) 0 2 { 3 4 for(j=0:j<5;j++) 0 { 1 if(i=j) 1 2 3 matriz[][]=1; 4 } 0 } 1 2 2 } 3 RESPUESTA: 4 0 1 3 1 2 1 3 1 4 0 1 1 4 2 1 3 4
  • 4. { 0 1 0 int m[5][5]; 2 for (int j=0;j<5;j++) 3 } 4 0 for(int i=0;i<5;i++) 1 { 2 1 m[j][i]=i; 3 4 } 0 } 1 2 RESPUESTA: 23 4 0 1 2 3 4 0 3 1 0 1 2 3 4 2 3 0 1 2 3 4 4 0 0 1 2 3 4 1 4 2 0 1 2 3 4 3 4 6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5 DE LA SIGUUIENTE MANERA.. { i j 0 int [5][5]; 1 for(i=0;i<5:i++) 0 2 { 3 4 for(j=0:j<5;j++) 0 { 1 if(i=j) 1 2 3 matriz[][]=1; 4 } 0 } 1 2 2 } 3 RESPUESTA: 4 0 1 3 1 2 1 3 1 4 0 1 1 4 2 1 3 4
  • 5. { 0 1 0 int m[5][5]; 2 for (int j=0;j<5;j++) 3 } 4 0 for(int i=0;i<5;i++) 1 { 2 1 m[j][i]=i; 3 4 } 0 } 1 2 RESPUESTA: 23 4 0 1 2 3 4 0 3 1 0 1 2 3 4 2 3 0 1 2 3 4 4 0 0 1 2 3 4 1 4 2 0 1 2 3 4 3 4 6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5 DE LA SIGUUIENTE MANERA.. { i j 0 int [5][5]; 1 for(i=0;i<5:i++) 0 2 { 3 4 for(j=0:j<5;j++) 0 { 1 if(i=j) 1 2 3 matriz[][]=1; 4 } 0 } 1 2 2 } 3 RESPUESTA: 4 0 1 3 1 2 1 3 1 4 0 1 1 4 2 1 3 4
  • 6. { 0 1 0 int m[5][5]; 2 for (int j=0;j<5;j++) 3 } 4 0 for(int i=0;i<5;i++) 1 { 2 1 m[j][i]=i; 3 4 } 0 } 1 2 RESPUESTA: 23 4 0 1 2 3 4 0 3 1 0 1 2 3 4 2 3 0 1 2 3 4 4 0 0 1 2 3 4 1 4 2 0 1 2 3 4 3 4 6._ ESCRIBA EL CODIGO PRINCIPAAL EN G++ PARA LLENAR UNA MATRIZ DE 5 POR 5 DE LA SIGUUIENTE MANERA.. { i j 0 int [5][5]; 1 for(i=0;i<5:i++) 0 2 { 3 4 for(j=0:j<5;j++) 0 { 1 if(i=j) 1 2 3 matriz[][]=1; 4 } 0 } 1 2 2 } 3 RESPUESTA: 4 0 1 3 1 2 1 3 1 4 0 1 1 4 2 1 3 4