Answer the question
In order to leave comments, you need to log in
C - how to align text in console?
You need to right-align the response in the console.
Prompt, please, variants of the decision.
#include <stdio.h>
int main()
{
int height;
printf ("height: ");
scanf ("%d", &height);
for (int i = 1; i <= height; i++) {
for (int j = 0; j <= i; j++) {
printf("#");
}
printf("\n");
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question