Créer un valarray des valeurs booléenne

Author:

 valarray
Download


#include 
#include 
#include 
#include 
using namespace std;

int main()
{
  valarray v(10);

  for(int i=0; i<10; i++)
      v[i] = rand()%10;

  cout << "Contenu initial de valarray: ";
  for( i=0; i<10; i++)
    cout << v[i] << " ";
  cout< vb = v%2==0;
  cout << "Afficher le contenu du valarray: ";
  for(i=0; i<10; i++)
    cout <
    

Leave a Reply

Your email address will not be published. Required fields are marked *