CG Technical Area > Programming

C++ post your shitt

<< < (2/3) > >>

Blackllama:

--- Quote from: Guvnuh on May 31, 2011, 07:56:15 PM ---
--- Code: ---#include <iostream>
using namespace std;

int main(void)
 {
cout<<"░░░░░▄▄▄▄▀▀▀▀▀▀▀▀▄▄▄▄▄▄░░░░░░░"<<endl;
cout<<"░░░░░█░░░░▒▒▒▒▒▒▒▒▒▒▒▒░░▀▀▄░░░░"<<endl;
cout<<"░░░░█░░░▒▒▒▒▒▒░░░░░░░░▒▒▒░░█░░░"<<endl;
cout<<"░░░█░░░░░░▄██▀▄▄░░░░░▄▄▄░░░░█░░"<<endl;
cout<<"░▄▀▒▄▄▄▒░█▀▀▀▀▄▄█░░░██▄▄█░░░░█░"<<endl;
cout<<"█░▒█▒▄░▀▄▄▄▀░░░░░░░░█░░░▒▒▒▒▒░█"<<endl;
cout<<"█░▒█░█▀▄▄░░░░░█▀░░░░▀▄░░▄▀▀▀▄▒█"<<endl;
cout<<"░█░▀▄░█▄░█▀▄▄░▀░▀▀░▄▄▀░░░░█░░█░"<<endl;
cout<<"░░█░░░▀▄▀█▄▄░█▀▀▀▄▄▄▄▀▀█▀██░█░░"<<endl;
cout<<"░░░█░░░░██░░▀█▄▄▄█▄▄█▄████░█░░░"<<endl;
cout<<"░░░░█░░░░▀▀▄░█░░░█░█▀██████░█░░"<<endl;
cout<<"░░░░░▀▄░░░░░▀▀▄▄▄█▄█▄█▄█▄▀░░█░░"<<endl;
cout<<"░░░░░░░▀▄▄░▒▒▒▒░░░░░░░░░░▒░░░█░"<<endl;
cout<<"░░░░░░░░░░▀▀▄▄░▒▒▒▒▒▒▒▒▒▒░░░░█░"<<endl;
cout<<"░░░░░░░░░░░░░░▀▄▄▄▄▄░░░░░░░░█░░";
system("pause>nul");
return 0;
}
--- End code ---

--- End quote ---

That is how it should look lol.  First of all, It doesn't look anywhere near a troll face in the cmd line.  Second, I added the
--- Code: --- system("pause>nul");
--- End code ---
because if you didn't, it would just close as soon as it ran.  Son, I am disappoint.

EDIT:

Also, I wrote a few programs on the TI-84 calculator like the Pythagorean theorem, and I re-wrote it in c++.  I may have written the same thing on python at one point as well, which, let me just say, is much better for mathematics.  C++ just makes it a pain, none the less I still made one.

Here.

--- Code: ---#include <iostream>
#include <math.h>
using namespace std;

int main ()
{
cout << "Pythagorean theorem calculator." << endl << "~~~~~~~~~~~~~~~~~~~~~~~~~" << endl << "Enter a: ";
int a, b;
cin >> a;
system("CLS");
cout << "Enter b: ";
cin >> b;
system("CLS");
cout << "c = " << sqrt(pow(a, 2)+pow(b, 2)) << "."
system("pause>nul");
return 0;
}
--- End code ---

Acecool:
1800 lines on here? Meh... If anyone wants to buy some code for Ashen Empires to bypass the macro check, let me know :-)

Burgers-13:
so taking a c++ course and im not learning diddly quawt from my teacher even tho shes really nice.. i have resorted to youtube and online help which is helping but it could only go so far..

im a total noob and im trying to make something as simple as a calculator for a food charge ex:

should ask you for the food charge and calculate the amount of a 18% tip and 7% sales tax and the toTAL.


this is what i have so far:


#include <iostream>
using namespace std;

int main()
{
   cout << "Enter charge for the food \n";
   const double PERCENT_TIP = 0.18;
      system("pause");
      return 0;
}


i dont know what function i put or how to put in the percentages into the code.  probably did that wrong helpeth

Finniespin:

--- Quote from: Finniespin on May 31, 2011, 05:54:03 AM ---:< I think C# is horrible already...

Here's aspx. (Some dutch content)
Nevermind stored it locally.

Posting soon!

--- End quote ---
OP SURELY DELIVERS...

Christovski:
Nice necro there Burgers :P

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version