+ 1
Want to print CHENGATSERING many times.
2 Respuestas
+ 1
This is quite simple, you can do it on your own as telling from your achievements, you already completed five lessons here at SoloLearn C++.
0
This should do.
#include <iostream>
#include <string>
int main()
{
std::string str = "CHENGATSERING";
int strLength = str.length();
for (int i = strLength - 1; strLength >= 0; i--)
{
std::cout << str << std::endl;
str.erase(i);
}
}