How to i get cubic numbers into a program?
Ive tried ^3, but in this line:


x = creat^3;
y = lines*20;
z = x+y;
cout<<"Your zenii for this post is " << z << ".\a" << endl;

If i change the cout to call out x it calls it out as 0, when i input the creat i use 3, so it should cube it to 27, but it calls out 0, why is this? How can i fix it?

The operator ^ is the bitwise XOR operator, not a cubic operator. There isn't a cubic operator. You can get the 3rd power of a number by using * like this:

int n = 2 * 2 * 2 ;

But how would i convert that into what i need? The number i want cubed is creat, and it is a user input number,
so for example the creat input is 6
I want it to take six and cube it, how would i do that?

Not sure if I follow, but what about

creat = creat * creat * creat;

Hmmm it still doesnt work, when i use that and change the cout to call out what x equals
'x = creat;' with what you told me to int creat as, it calls out 3 when i input the creat as 3, when it should call out 27 =/

Perhaps you mean to do

x = creat * creat * creat;

Anyway please post your code again after you've made any changes.

Ahhhhh, lol thanks thats got it working,

else if(value == 1)
	{
		system("title AnimeDD Zenii Calculator");
		system("color 8E");
		cout <<"Alright time to calculate your Zenii, get your storyline ratings ready!" << endl;
		int lines, creat, x, y, z;
		cout<<"What is your characters name?"<< endl;
                cin>> name; (name,100);
                cout<<"Hello, " << name << "."<<  endl;
		cout<<"Put in your creativity rating for the storyline post"<< endl;
		cin>> creat;
		cout<<"Thank you, Now put in your line count for the storyline post"<< endl;
		cin>> lines;
		x = creat*creat*creat;
		y = lines*20;
		z = x+y;
		cout<<"Your zenii for this post is " << z << ".\a" << endl;
		cout<< ""<< endl;
                cout<<"Q - Quit"<< endl;
                cout<<"R - Repeat"<< endl;
                cout<<"Please type in the corresponding letter for your choice then press enter."<< endl;
                cin>> quit;
                cout<<"Goodbye, " << name << "."<< endl;
                system("PAUSE");
                system("cls");
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.