this is a program to change the case of all letters input by the user to small. im getting the right output with this coding. the problem is that its giving some staircase type structure as the output as well. HOW DO I GET RID OF THIS EXTRA STUFF?
#include <iostream>
using namespace std;
void main ()
{
char word [20];
cout<<"enter line :";
cin.getline(word,20);
int wordint [20];
char wordchar [20];
for (int i=0; i<20; i++)
{
wordint[i]=(int)word[i];
if(wordint[i]<=90)
wordint[i]+=32;
wordchar[i]=(char)wordint[i];
if(word[i]=='\0')
break;
}
cout<<wordchar;
}