Write a C++ program that defines a function that prints every “x” character in the string.
a. For example, with a string “Hello World” and x = 4, the function should print “lo”
b. With a string “Hello World” and x = 5, the function should print “ol”
c. With a string “Hello World” and x = 1, the function should print “Hello World” d. With a string “Hello World” and x = 2, the function should print “el ol”
Create a function that takes as its arguments the string and the increment d. void strikeOut( string text, int d )
Use a standard for-loop to cycle through the text[i], writing out that character and incrementing i by d each pass. The length of the string is given by text.size().