Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 21st, 2012  |  syntax: None  |  size: 0.43 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. double ProdEscalar (float V[], float V2[], unsigned short Tam)
  2. {
  3.         double res = 0;
  4.         int i;
  5.         for (i=0; i < Tam; i++) {
  6.                    printf("Introduzca un numero: ");              
  7.                    scanf("%f",&v[i]);
  8.                    printf("Introduzca un numero: ");              
  9.                    scanf("%f",&v2[i]);
  10.                 resultado += v[i] * v2[i];
  11.         }
  12.         return res;
  13. }