Matrices 3

  • May 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Matrices 3 as PDF for free.

More details

  • Words: 93
  • Pages: 1
# include <stdio.h> # include /*Tarea N� 2*/ /*Peralta Raul*/ /*3) Cree una Funci�n que sume la cantidad de veces que aparece el n�mero 5 en un matriz de 4�3 y muestre en pantalla.*/ int ma[4][3]; int i,j, tres; int cinco; void main () { ma[4][3]=0; i=0; j=0; cinco=0; tres=0; for (i=0;i<4;i++) { for (j=0;j<3;j++) { printf ("\ningrese un valor para la posicion:[%i][%i]",i,j); scanf ("%i", &ma[i][j]); } } for (i=0;i<4;i++) { for(j=0;j<3;j++) { if (ma[i][j]==5) { cinco++; } } } printf ("\nHay %i celdas que contienen el numero: 5\n", cinco); getche(); }

Related Documents

Matrices 3
May 2020 3
Matrices 3
May 2020 3
Matrices 3
April 2020 6
Matrices
November 2019 36
Matrices
May 2020 19
Matrices
June 2020 18