And it is so complicated..
First the 1/4 of the diamond will print first
____1
___12
__123
_1234
12345
then the second 1/4
1
12
123
1234
12345
then the 3rd 1/4
__12345
___123
____12
_____1
then the last 1/4
12345
123
12
1
using the delay for example delay(100)
we are using the header file #include.stdio> ,#include<conio.h> include<dos.h>
I don't know how to do... i'm sorry if i don't post any of my code because i don't know.. I am only beginner.. this is out assignment.. any reply will be greatfully accepted.. I'm so sorry :)))
i think it is like this but the output is asterisk (*)
#include <iostream>
int main()
{
for (int i = 0; i < 5; i++)
{
for (int j = 3 - i; j >= 0; j--)
std::cout << " ";
for (int j = 0; j < i + 1; j++)
std::cout << "* ";
std::cout << std::endl;
}
return 0;
}
i'm not familiar with the iostream...
pls.. use the printf or the stdio.h and conio.h