summaryrefslogtreecommitdiff
path: root/3p8-v1.cpp
blob: 0c6e8765dfc106f100dd99b0194d585d72e9b4cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>

/*
 *
 * 3.8 v1
 *
 *
 */

using std::string;
using std::cout;
using std::cin;
using std::cerr;
using std::clog;
using std::endl;
int main () {

    string Xer;
	cout << "Enter a string" << endl;
	cin >> Xer;
	decltype(Xer.size()) Index = 0;
	while(Index != Xer.size()) {
		Xer[Index++] = 'X'; // We can use post increment operator
		//Index++; // Or we can increment it here
		//++Index; // We could also do this
	}

	cout << Xer << endl;
	return 0;
}