kiraes
Disconsented
(?)Community Member
- Report Post
- Posted: Thu, 22 Nov 2012 01:05:40 +0000
Trying to decide of that programmer is:
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
kiraes
(?)Community Member
- Report Post
- Posted: Thu, 22 Nov 2012 01:25:48 +0000
Disconsented
Trying to decide of that programmer is:
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
For a quick throwaway variable that you're only going to use once, it's sometimes okay to use a single letter. For example, when I'm writing Ruby, I like to use the letters i, o, or e in blocks for variables that will be serving as iterators.
Example:
["Hello", " ", "World", "n"].each { |e| print e }
Because the scope is limited and I can generally accept "e" to mean "element", I don't bother to add anything else.
For variables with any semblance of meaning, however, giving them a proper name is generally wise.
In any case, I'm going to go with "troll" for what you're wondering he was. Because really, what kind of person makes a for loop that only executes once.
sneakyjizzs adorable son
(?)Community Member
- Report Post
- Posted: Thu, 22 Nov 2012 02:17:59 +0000
OH DEAR LORD WHAT THE HELL IS THAT CRAP
Another highlight:
I love the "Random number" output.
This guy's never heard of for, evidently, or doesn't know how to use it. lol
// RANDOM NUMBER DECLARATION
void Math::Rando()
{
int xn;
do
{
int pi;
int phi;
int o;
int ii;
int ddd;
cout<<endl;
cout<<"======================="<<endl;
cout<<"Random Number Genorator"<<endl;
cout<<"======================="<<endl;
cout<<endl;
cout<<"|Custom - Press 1 | ";
cout<<"1 to 10 - Press 2 | ";
cout<<"1 to 50 - Press 3 | ";
cout<<"1 to 100 - Press 4|";
cin>>o;
cout<<endl;
cout<<"Amount of numbers (20 max):";
cin>>phi;
do
{
if(o == 1)
{
pi++;
cout<<endl;
cout<<"From 1 to : ";
cin>>ddd;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
}while(pi == phi)
if(o == 2)
{
do
{
if(o == 1)
{
pi++;
cout<<endl;
cout<<"From 1 to : ";
cin>>ddd;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
}while(pi == phi)
}
if(o == 3)
{
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
cout<<endl;
cout<<"Random Number: "<<rand()P<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
if(o == 4)
{
pi++;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
cout<<endl;
cout<<"Menu - 1"<<endl;
cout<<"Exit - 2"<<endl;
cin>>xn;
}while(xn == 1)
}
(probablytoolongtopostorallowedtopost) ninja
Another highlight:
I love the "Random number" output.
This guy's never heard of for, evidently, or doesn't know how to use it. lol
// RANDOM NUMBER DECLARATION
void Math::Rando()
{
int xn;
do
{
int pi;
int phi;
int o;
int ii;
int ddd;
cout<<endl;
cout<<"======================="<<endl;
cout<<"Random Number Genorator"<<endl;
cout<<"======================="<<endl;
cout<<endl;
cout<<"|Custom - Press 1 | ";
cout<<"1 to 10 - Press 2 | ";
cout<<"1 to 50 - Press 3 | ";
cout<<"1 to 100 - Press 4|";
cin>>o;
cout<<endl;
cout<<"Amount of numbers (20 max):";
cin>>phi;
do
{
if(o == 1)
{
pi++;
cout<<endl;
cout<<"From 1 to : ";
cin>>ddd;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
}while(pi == phi)
if(o == 2)
{
do
{
if(o == 1)
{
pi++;
cout<<endl;
cout<<"From 1 to : ";
cin>>ddd;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<", "<<rand()�d<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
}while(pi == phi)
}
if(o == 3)
{
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
cout<<endl;
cout<<"Random Number: "<<rand()P<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
if(o == 4)
{
pi++;
srand(time(0))
for(ii = 0; ii < 1; ii++)
{
if(phi == 1)
{
cout<<endl;
cout<<"Random Number: "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 2)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 3)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 4)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 5)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 6)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 7)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 8)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 9)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 10)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 11)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 12)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 13)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 14)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 15)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 16)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 17)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 18)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 19)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
if(phi == 20)
{
cout<<endl;
cout<<"Random Numbers: "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<", "<<rand()0<<endl;
cout<<"--------------------------------------------------------------------------------"<<endl;
cin.get()
cin.get()
}
}
}
cout<<endl;
cout<<"Menu - 1"<<endl;
cout<<"Exit - 2"<<endl;
cin>>xn;
}while(xn == 1)
}
(probablytoolongtopostorallowedtopost) ninja
The20
(?)Community Member
- Report Post
- Posted: Sat, 24 Nov 2012 11:42:58 +0000
Disconsented
Trying to decide of that programmer is:
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
1)A troll
2)Stupid
3)Bad Programmer
4)High
5)Drunk
6)All of the above.
Can somebody explain to me why people use single letters for variable names, I've always been under the impression that it is good practice the have the name relate to its purpose.
Of course it all depends on the situation, but a single letter can be a perfectly adequate (and not confusing) variable name.
Ice-Paige
(?)Community Member
- Report Post
- Posted: Sat, 24 Nov 2012 16:10:07 +0000
not bad razz
Lanackse-Kanvae
(?)Community Member
Offline
- Report Post
- Posted: Sun, 25 Nov 2012 12:29:55 +0000
Reycom-Andrews
not bad razz
You're right it's not bad. IT'S ******** TERRIBLE.
If my Java tutor was to catch such s**t, you'd be docked a load of marks for that assignment and since 2 assignments each form 30% of the final grade for that module, you do not want to be dropping marks in assignments if you can help it.
That reminds me I must look into that thing about overriding instance variables from the defaults granted from another class.
kiraes
(?)Community Member
- Report Post
- Posted: Sun, 25 Nov 2012 21:56:16 +0000
Lanackse-Kanvae
Reycom-Andrews
not bad razz
You're right it's not bad. IT'S ******** TERRIBLE.
If my Java tutor was to catch such s**t, you'd be docked a load of marks for that assignment and since 2 assignments each form 30% of the final grade for that module, you do not want to be dropping marks in assignments if you can help it.
That reminds me I must look into that thing about overriding instance variables from the defaults granted from another class.
2 assignments to form 30% of the grade? That's a bit harsh. I'm in a 300 level Computer Science class that's using Java (and some Ada) as the course language, and even then, our grading structure is:
5 assignments worth 10% each
2 tests (one of which is a final) worth 25% each.
birdman3131
(?)Community Member
- Report Post
- Posted: Sun, 25 Nov 2012 22:33:33 +0000
Let me point y'all at http://thedailywtf.com/ where this is fairly normal code. Such as this gem.. Be sure to scroll over and to also watch the video.
kiraes
(?)Community Member
- Report Post
- Posted: Mon, 26 Nov 2012 02:24:32 +0000
The20
(?)Community Member
- Report Post
- Posted: Mon, 26 Nov 2012 12:12:19 +0000
birdman3131
Lanackse-Kanvae
(?)Community Member
Offline
- Report Post
- Posted: Mon, 26 Nov 2012 13:19:52 +0000
kiraes
Lanackse-Kanvae
Reycom-Andrews
not bad razz
You're right it's not bad. IT'S ******** TERRIBLE.
If my Java tutor was to catch such s**t, you'd be docked a load of marks for that assignment and since 2 assignments each form 30% of the final grade for that module, you do not want to be dropping marks in assignments if you can help it.
That reminds me I must look into that thing about overriding instance variables from the defaults granted from another class.
2 assignments to form 30% of the grade? That's a bit harsh. I'm in a 300 level Computer Science class that's using Java (and some Ada) as the course language, and even then, our grading structure is:
5 assignments worth 10% each
2 tests (one of which is a final) worth 25% each.
It's harsh but that's reality for that particular module.
trezoid
(?)Community Member
- Report Post
- Posted: Tue, 27 Nov 2012 01:27:24 +0000
kiraes
Lanackse-Kanvae
Reycom-Andrews
not bad razz
You're right it's not bad. IT'S ******** TERRIBLE.
If my Java tutor was to catch such s**t, you'd be docked a load of marks for that assignment and since 2 assignments each form 30% of the final grade for that module, you do not want to be dropping marks in assignments if you can help it.
That reminds me I must look into that thing about overriding instance variables from the defaults granted from another class.
2 assignments to form 30% of the grade? That's a bit harsh. I'm in a 300 level Computer Science class that's using Java (and some Ada) as the course language, and even then, our grading structure is:
5 assignments worth 10% each
2 tests (one of which is a final) worth 25% each.
I had one unit where one assignment was worth 50%, one was worth 20%, and the exam is worth 30%...And that's pretty much normal.
Usaki Tsukino
(?)Community Member
Offline
- Report Post
- Posted: Sun, 16 Dec 2012 07:46:34 +0000
trollcode lol
...my own code might not be so lousy after all xP
...my own code might not be so lousy after all xP
Scriptkittwenty
(?)Community Member
- Report Post
- Posted: Wed, 09 Jan 2013 05:50:26 +0000
Sweet misery! Granted I've not programmed anything in two years and my knowledge of Java is limited... But this code makes me want to either slap someone or cry. Not entirely sure which I'd like to do more.