Just have to pad the spaces first and then draw a star.
Type: Posts; User: Crutoy37
Just have to pad the spaces first and then draw a star.
How far did you get? I'll be working on something similar soon.
Thanks aGerman, it is useful.
Oh wow, that's neat. Thanks for that. Totally eliminates the rest of the code. No the book did not cover yet that the printf has this formatting ability. I assume it might go into more details when...
This is how I solved it. I am not sure if this is how it was supposed to be done. I am looking more for validation if I was on the right path or critique. Please let me know.
int main(void)...
Yes, newNumber should have been initialized to 0 at the beginning. I haven't covered arrays yet, therefore I can't use it yet. I am close to solving this without using separate variables. I'll post...
Yes, I think I solved the first part. This is what I have so far.
int main(void){
int number, newNumber,remainder,diviser = 1000;
printf("%s","Enter a four digit number: ");
...
Hello everyone. I am self learning C from the Dietel and Dietel book C How to program. I am doing an assignment at the end of the chapter that requires to encrypt a four digit integer as follows....