Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4.   main () {
  5.  float v[]={1.0,2.0};
  6. produto(v,10.0);
  7. int j;
  8. for (j=0; j<2;j++){
  9. printf("%f\n",v[j]);
  10.  
  11. }
  12.  
  13.  
  14.     }
  15.  
  16. void produto(float vet[], float num ) {
  17. int i =0;
  18. for (i=0 ;i<2 ;i++) {
  19. vet[i]=vet[i]*num;
  20.  
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement