I am trying to add a space to each space until column = 0. I am not sure how to do this.
The problem is the following. If you look at a newspaper you will s
This is what i made. It's far from ideal, but you get the point. You just need to put in conditions, like when the string entered is larger or equal than 40 chars, to skip the procedure.
#include
#include
#include
int main(void)
{
int i = 0; // first just initialiaze stuff
char ch[40]; // memset the arrays, get the string
memset(ch, '\0', 40);
gets(ch);
int diff = 40 - strlen(ch);
int spaces = 0;
while(i