Advertisement
CamolaZ

p135p0603Adaptation

Oct 9th, 2020 (edited)
1,011
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. /******************************************************************************
  2.  
  3.                             Online C Compiler.
  4.                 Code, Compile, Run and Debug C program online.
  5. Write your code in this editor and press "Run" button to compile and execute it.
  6.  
  7. *******************************************************************************/
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. void inic(int s[], int n)
  13. {
  14.     int i;
  15.     for(i=0;i<n;i++){
  16.         s[i]=0;
  17.        // printf("Vetor",)
  18.     }
  19. }
  20.  
  21. void printV(int s[], int m)
  22. {
  23.     int i;
  24.     for(i=0;i<m;i++)
  25.         printf("Valor: %d\n", s[i]);
  26. }
  27.  
  28. int main()
  29. {
  30.     int v[10];
  31.     int x[20];
  32.    
  33.     inic(v,8);
  34.     inic(x,22);
  35.     printV(v,10);
  36.     printV(x,20);
  37.  
  38.     return 0;
  39. }
  40.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement