for (i=0;i<=ni;i++)
{
for (j=0;j<=nj;j++)
{
printf("*");
}
printf("\n");
}
/*this part is rectangle which looks like this **********
**********
********** */
void Countdown (short nZeit) //this part is countdown
{
for (nZeit=10; nZeit>0; nZeit--)
{
printf("%d\b\b", nZeit);
fflush(stdin);
Sleep(1000);
}
}
/*i need to make a code like this:
******************************
*** ***
*** Simulation start in ***
*** ***
*** 10 seconds ***
*** ***
******************************
the 10 seconds is a countdown*/
On windows you may have the header #include <conio.h> but it isn't part of the standard so may not be present, or if it is, the functions available may differ, or behave differently. You could try gotoxy() or write your own, see this thread and post from Duoas, http://www.cplusplus.com/forum/beginner/4234/#msg18563
If you are not using windows, or want a cross-platform solution, look into ncurses as suggested.
The post I linked to shows how to use SetConsoleCursorPosition in order to make your own version of gotoxy. That's just for convenience, it makes it simpler to use.
The idea is that the console is considered as a grid of rows and columns, before using printf or cout, first position the cursor where you'd like it. Really, the only way to understand better is to try it out, experiment a little.