Advertisement
jasonpogi1669

Produce a String with length m using a specific character in C++

Mar 5th, 2022
1,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main() {
  5.     ios::sync_with_stdio(false);
  6.     cin.tie(0);
  7.     int m = 5;
  8.     char ch = 'B'
  9.     string sample_string(m, ch);
  10.     cout << sample_string << '\n';
  11.     return 0;
  12. }
  13.  
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement