Sunday, May 31, 2009

Blocked Up In Mornings

example

/ * To give you a guide to do the workshop lab 5 and 5, made this year. ;)
if something goes wrong they are by the copy-paste ... review it and fix it!

* /

< iostream> # include using namespace std
;

void read (int v [], int n) {court
<<"Ingrese los valores del vector:\n";
for (int i = 0; i < n;i++)
cin>> v [i];}


void print (int v [], int n) {
for (int i = 0; i < n;i++)
court << v[i]<<">
}


contarApariciones int (int v [], int n, int value) {int
cont = 0;
for (int i = 0 ; i < n;i++)
if (value == v [i])
cont + +;
return cont;
}

int calcularModa (int v [], int n) {
int mode = v [0] = 1 contmoda, cont;
for (int i = 0; i < n;i++){
contarApariciones cont = (v, n, v [i]);
if (cont> contmoda) {
contmoda = cont;
mode = v [i];

}} return
fashion;


} void pause ( ) {
<<"\n\n";
court system ("pause");


} int main () {int
vector [5], size = 5, mode;
read (vector , size);
print (vector, size);
mode = calcularModa (vector, size);
<<"\nLa moda es "<< moda;
court <<" y aparece"<< contarApariciones(vector,tamano,moda)<<" veces";
court pause ();
return 0;}

Friday, May 8, 2009

Pakistani Valima Cards Wordings

functions and procedures Practical exercises with Edwin

Choose 3 of the following exercises:
1. Check if a matrix is \u200b\u200bthe identity matrix.
2. Check if a matrix is \u200b\u200bsymmetric.
3. Find the transpose of a given matrix.
4. Find the maximum of each row and each column.
5. Carrying out a program to perform operations on matrices (addition, multiplication by a scalar multiplication between matrices).

Support material:
http://es.wikipedia.org/wiki/Matriz_ (mathematical% C3% A1tica)
http://es.wikipedia.org/wiki/Producto_de_matrices
http://es.wikipedia.org/wiki/Matriz_sim% C3% A9trica
http://es.wikipedia.org/wiki/Matriz_transpuesta