Print a value n times using vector

Suman Barik
0

#include <iostream>

#include <vector>

using namespace std;


int main()

{

vector<int> vect1(10);

int value = 5;

fill(vect1.begin(), vect1.end(), value);

for (int x : vect1)

cout << x << " ";

}


Tags

Post a Comment

0Comments
Post a Comment (0)