PROGRAM:
#include<iostream> using namespace std; int main() { char str[100]; int w=1; cout<<"Please enter a String: "; gets(str); for (int i=0;str[i]!='
Professional way of Programming
#include<iostream> using namespace std; int main() { char str[100]; int w=1; cout<<"Please enter a String: "; gets(str); for (int i=0;str[i]!='