Advertisement
Jambix64

ArraysEmArgumentosDeFuncao

Aug 1st, 2016
464
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip> //Bliclioteca de espaçao setw()
  3. #include <winsock2.h>
  4. #include <stdlib.h>
  5. #include <fstream>
  6. #include <windows.h>
  7. #include <ctime>
  8. #include <string>
  9.  
  10. using namespace std;
  11.  
  12.   void number(int [],int );
  13. int main(){
  14.    
  15.     const int a =2;
  16.     int c[a] = {'a','b'};
  17.     number(c,a); // C Arrays; A quantidade de elementos;
  18.    
  19.     for(int i=0;i<a;){
  20.         i++;
  21.         c[i];
  22.     }
  23.    system("pause");
  24.    return 0;
  25. }
  26.  
  27. void number (int a[],int c){
  28.  
  29.     for (int i =0;i<c;){
  30.         i++;
  31.      cout<<a[i]<<endl;
  32.      
  33.     }  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement