Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/11/2013, 14:08
Avatar de RobCo
RobCo
 
Fecha de Ingreso: julio-2012
Mensajes: 50
Antigüedad: 11 años, 9 meses
Puntos: 1
Respuesta: Tengo problema al hacer este ejercicio

Me falto agregar el código

Código C:
Ver original
  1. #include <stdio.h>
  2. #include <conio.h>
  3. #include <stdlib.h>
  4.  
  5. int Ingresar(int Matriz[8][8]);
  6. int VerSuma(int Matriz[8][8]);
  7.  
  8. int Matriz[8][8];
  9. int Fila, Columna;
  10. int Opcion=0;
  11. int Prueba;
  12. int Ingresar(int Matriz[8][8])
  13. {
  14.     for(Fila = 1; Fila <= 3; Fila++)
  15.     {
  16.        for(Columna = 1; Columna <= 3; Columna++)
  17.        {
  18.            
  19.      scanf("%d",&Matriz[Fila][Columna]);
  20.      }
  21.      }
  22.      
  23. }
  24. int VerSuma(int Matriz[8][8])
  25. {
  26.       for(Fila = 1; Fila <= 3; Fila++)
  27.     {
  28.        for(Columna = 1; Columna <= 3; Columna++)
  29.        {
  30.            
  31.      printf("%d",&Matriz[Fila][Columna]);
  32.      }
  33.      }
  34.      getch();
  35. }
  36.  
  37. main()
  38. {
  39.       do
  40.       {
  41.              system("cls");
  42.       printf("\t\tMenu");
  43.       printf("\n\n"); //Dos Nuevas línea
  44.       printf("Presione 1 ----------- Ingresar Datos");
  45.       printf("\n\n"); //Dos Nuevas línea
  46.       printf("Presione 2 ----------- Ver Resultado ");
  47.        printf("\n\n"); //Dos Nuevas línea
  48.        printf("Presione 3 ----------- Salir ");
  49.        printf("\n\n"); //Dos Nuevas línea
  50.       printf("Presione la tecla 1, 2 o 3 y presione ENTER: ");
  51.       scanf("%d",&Opcion);
  52.       switch(Opcion)
  53.       {
  54.           case 1:
  55.                Ingresar(Matriz);
  56.           break;
  57.           case 2:
  58.                VerSuma(Matriz);
  59.           break;
  60.            case 3:
  61.              
  62.           break;
  63.           default:
  64.                 printf("\n\n"); //Dos Nuevas línea
  65.                    printf("Opccion incorrecta. Presione ENTER");
  66.                    
  67.                    
  68.                     getch();
  69.                   break;
  70.       }
  71.     }while(Opcion!=3);
  72.     return 0;
  73.      
  74. }

Bien, Yo ingreso los datos en la matriz, pero al mostrar los datos, me muestra números que ni siquiera ingrese

Última edición por RobCo; 20/11/2013 a las 14:11 Razón: Me falto añadir información importante