If you're curious, test it on your own computer :P
I just did, and it did exactly what I said it would.
Not really a good idea.
If you're curious, test it on your own computer :P
I just did, and it did exactly what I said it would.
Not really a good idea.
for(int i = 1; i <= 10; i++)
{
for(int j = 1; i <= i; j++)
System.print(j);
System.println();
}
Although realize, that you can take certain courses thats not in your major.
So you can take certain courses, thats related to computers, but is not
in your major.
>So if you did mean well.. and even if it came out in a bent, skewed
>and poorly communicated way, well thank you I do actually appreciate that.
Too little, too late, and wording it like your misunderstanding is my fault. It's a wonder you have any friends at all. By the way, if you were truly interested in peace and happiness, you should have taken more time to understand my post before mouthing off.You fail. Plonk.
Your a cocky girl huh?
True.
But the program still wouldn't work
Yes thats true. I never said it would work.
I tried changing the int to double but then the program will not run"
Thats because of your function. It accepts an int array. You need
to change the function to accept an double array.
void selection_sort(int input_array[], int input_size);
void display_array(int input_array[], int input_size);
to
void selection_sort(double input_array[], int input_size);
void display_array(double input_array[], int input_size);
And also change the function header to match the prototype.
On an alternative note, there is std::sort() function.
I can revive it once a while.
This has already been said in the sticky thread posted by Narue, what makes you think anybody will read this?
Because a title named Cool New Game must See!! is more
catching than Thread Rules or something similar.
Lets see what you are doing :
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int a, result, factorial(a); //declare 'a' as an int
//declare 'result 'as an int
//declare 'factorial' as in int, initialized to
//the value of 'a' which is ? junk...
{
cout << "please enter a number "; //ask user for input
cin >> a; //read in the input
cout << factorial(a); //display factorial(a) ??? I assume you believe
//that factorial is defined in cmath, which is
//not, and if you do then why were you declaring it as a variable?
}
for(a=1; a>0; a--) //start a loop from a = 1 until a <=0, which means
//this loop will only execute once
{
factorial *=a; //now take the variable functions thingy and
//multiply it by a, which is 1 , which means the
//variable function thingy has not changed
}
return 0; //return success, as if it were.
}
//Are used to determine if certain settings are enabled/disabled
//0->disabled
//1->enabled
"static int useRGB = 1;
static int useLighting = 1;
static int useFog = 0;
static int useDB = 1;
static int useLogo = 0;
static int useQuads = 1;"
//used for delay
static int tick = -1;
//determine if object is moving
static int moving = 1;
//color constants
#define GREY 0
#define RED 1
#define GREEN 2
#define BLUE 3
#define CYAN 4
#define MAGENTA 5
#define YELLOW 6
#define BLACK 7
//material color property
static float materialColor[8][4] =
{
{0.8, 0.8, 0.8, 1.0},
{0.8, 0.0, 0.0, 1.0},
{0.0, 0.8, 0.0, 1.0},
{0.0, 0.0, 0.8, 1.0},
{0.0, 0.8, 0.8, 1.0},
{0.8, 0.0, 0.8, 1.0},
{0.8, 0.8, 0.0, 1.0},
{0.0, 0.0, 0.0, 0.6},
};
//light position
static float lightPos[4] =
{2.0, 4.0, 2.0, 1.0};
#if 0
static float lightDir[4] =
{-2.0, -4.0, -2.0, 1.0};
#endif
//light properties
static float lightAmb[4] =
{0.2, 0.2, 0.2, 1.0};
static float lightDiff[4] =
{0.8, 0.8, 0.8, 1.0};
static float lightSpec[4] =
{0.4, 0.4, 0.4, 1.0};
//quads vertices
static float groundPlane[4] =
{0.0, 1.0, 0.0, 1.499};
static float backPlane[4] =
{0.0, 0.0, 1.0, 0.899};
//fog settings
static float fogColor[4] =
{0.0, 0.0, 0.0, 0.0};
static float fogIndex[1] =
{0.0};
//shadow patterns
static unsigned char shadowPattern[128] =
{
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, /* 50% Grey */
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55,
0xaa, 0xaa, 0xaa, 0xaa, 0x55, 0x55, 0x55, 0x55, …
first off iostream.h is not standard so dont bother using it. use
#include<iostream> instead.
to solve your problem try doing this :
#include<iostream>
using namespace std; //important.
int main(){
cout<<"Hello world."<<endl;
return 0;
}