public class PascalsTriangle
{
public static void main(String[] args)
{
//number of rows
int r = 6;
for (int i = 0; i < r; i++)
{
for (int k = r; k > i; k--)
{
System.out.print(" ");
}
int num = 1;
for (int j = 0; j <= i; j++)
{
System.out.print(num + " ");
// Pascal's triangle formula
num = num * (i - j) / (j + 1);
}
//print a new line
System.out.println();
}
System.out.println("Decoder();");
}
}
@de_coder
{
public static void main(String[] args)
{
//number of rows
int r = 6;
for (int i = 0; i < r; i++)
{
for (int k = r; k > i; k--)
{
System.out.print(" ");
}
int num = 1;
for (int j = 0; j <= i; j++)
{
System.out.print(num + " ");
// Pascal's triangle formula
num = num * (i - j) / (j + 1);
}
//print a new line
System.out.println();
}
System.out.println("Decoder();");
}
}
@de_coder
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
static const char alphanum[] =
"0123456789"
"!@#$%^&*"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
int size = sizeof(alphanum) - 1;
int main()
{
//password length
int length = 8;
srand(time(0));
for (int i = 0; i < length; i++)
{
cout << alphanum[rand() % size];
}
cout << "\n\nDecoder();";
return 0;
}
@de_coder
#include <cstdlib>
#include <ctime>
using namespace std;
static const char alphanum[] =
"0123456789"
"!@#$%^&*"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
int size = sizeof(alphanum) - 1;
int main()
{
//password length
int length = 8;
srand(time(0));
for (int i = 0; i < length; i++)
{
cout << alphanum[rand() % size];
}
cout << "\n\nDecoder();";
return 0;
}
@de_coder
<svg width="350"height="430">
<ellipse cx="170" cy="90"
rx="65" ry="65" fill="white" stroke="black" stroke-width="6"/>
<ellipse cx="147" cy="70" rx="8" ry="11" fill="gray"/>
<ellipse cx="194" cy="70" rx="8" ry="11" fill="gray" />
<ellipse cx="172" cy="95" rx="10" ry="5" fill="#F90" />
<circle r="4px" fill="gray" cx="165" cy="115"/>
<circle r="4px" fill="gray" cx="176" cy="115"/>
<circle r="4px" fill="gray" cx="155" cy="112"/>
<circle r="4px" fill="gray" cx="187" cy="112"/>
<ellipse cx="170" cy="310" rx="110" ry="90" fill="white" stroke="black" stroke-width="6 "/>
<ellipse cx="170" cy="200" rx="80" ry="70" fill="white" stroke="black" stroke-width="6 "/>
<ellipse cx="170" cy="240" rx="66" ry="60" fill="white" />
<circle r="8px" fill="gray" cx="170" cy="180"/>
<circle r="8px" fill="gray" cx="170" cy="210"/>
<circle r="8px" fill="gray" cx="170" cy="240"/>
<circle r="8px" fill="gray" cx="170" cy="270"/>
</svg>
@de_coder
<ellipse cx="170" cy="90"
rx="65" ry="65" fill="white" stroke="black" stroke-width="6"/>
<ellipse cx="147" cy="70" rx="8" ry="11" fill="gray"/>
<ellipse cx="194" cy="70" rx="8" ry="11" fill="gray" />
<ellipse cx="172" cy="95" rx="10" ry="5" fill="#F90" />
<circle r="4px" fill="gray" cx="165" cy="115"/>
<circle r="4px" fill="gray" cx="176" cy="115"/>
<circle r="4px" fill="gray" cx="155" cy="112"/>
<circle r="4px" fill="gray" cx="187" cy="112"/>
<ellipse cx="170" cy="310" rx="110" ry="90" fill="white" stroke="black" stroke-width="6 "/>
<ellipse cx="170" cy="200" rx="80" ry="70" fill="white" stroke="black" stroke-width="6 "/>
<ellipse cx="170" cy="240" rx="66" ry="60" fill="white" />
<circle r="8px" fill="gray" cx="170" cy="180"/>
<circle r="8px" fill="gray" cx="170" cy="210"/>
<circle r="8px" fill="gray" cx="170" cy="240"/>
<circle r="8px" fill="gray" cx="170" cy="270"/>
</svg>
@de_coder