Answer the question
In order to leave comments, you need to log in
How to make a word appear in a column?
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
int main ( )
{
char *s;
s = new char[50];
cin >> s;
int d = 0;
while (*s++) d++;
cout << d;
}
Answer the question
In order to leave comments, you need to log in
for(int i=0; i < 50; i++)
{
if(s[i]=='\0') break;
cout << s[i]<< endl;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question