#include <iostream> using namespace std; int main() { string input; cout<<“Enter a string : “<<endl; cin >> input; cout<<“Removed last character : “<<input.substr(0, input.size() - 1)<<endl; }