Someone help me creating a this program. Well, I need a program that makes a triangle out of asterisk but it doesnt use "for" loop it only requires "do-while" loop. Actually I tried making one but it doesn't look like a triangle instead it jsut display a line of asterisk.
#include<stdio.h>
#include<conio.h>
int main()
{
int integer, counter, counter2;
counter = 0;
counter2 = 0;
printf("Enter a number: ");
scanf("%d",&integer);
do {
printf("*");
integer++;
}while(counter<0);
do {
printf("*");
counter++;
}while(counter<integer);
getch();
return 0;
}