Title: Need some ideas!
Description: Like som help on what to create!
ZerO - December 8, 2003 05:32 PM (GMT)
Hi there... I'm kinda new on c++, I'v done some reading and know the basics (I hope) but I wonder if you could give me some inforamtion on where to beggin wrighting my own programs... Up to this point I have only wrote stupid math programs, and want to do something more interessting than that! Rember I'm only a beginner!
TheHawgMaster - December 9, 2003 01:16 AM (GMT)
Try to create a program that has the user enter three numbers for a quadratic equation in the form of 0 = ax˛ + bx + c and calculates the possible values for x
Dragon - December 9, 2003 04:20 AM (GMT)
If you want more of a challenge, then make a program that calculates the two square roots of every complex number except for zero. I haven't made a program that did this before, and it might be interesting.
inline_skater20032001 - December 9, 2003 11:41 AM (GMT)
If you have learned console programming, and you want to make a simple game you could make a text adventure. :)
J-Swift - December 11, 2003 09:57 AM (GMT)
A craps game is not too hard but at the same time allows you to apply the basics of C++ (enum, rand functions, switch statements, possible error detection if you would like). I got a ton of cool, pretty difficult projects from the deitel & deitel book if you want some harder ideas.
ZerO - January 12, 2004 10:03 PM (GMT)
All ideas will be taken with gratitude...
Not very used to make programs out of my own mind... Think I'm starting to get the hang of console programming... So I thought a text game could be fun... But hoped to get some info on where to begin....
KTC - January 13, 2004 11:45 AM (GMT)
| QUOTE (Dragon @ Dec 9 2003, 04:20 AM) |
| If you want more of a challenge, then make a program that calculates the two square roots of every complex number except for zero. I haven't made a program that did this before, and it might be interesting. |
Hmmmm that would be an interesting challenge :) I'll have to try that one sometime soon. But then, it means I'll have to revise on how to calculate complex square roots... :blink:
Probably a good thing considering I've got an uni exam with that as part of it this Sat.... :D
myork - January 22, 2004 09:41 PM (GMT)
The first program I wrote in C++ was chess.
The pieces make for an excellent example of inheritance.
You can make the board a static object etc, if you want to go a step further you can make the board a singleton.
NB. All pieces need access to the board so they can check their own move is valid.
Entering an invalid move thorws an exception etc.
Don't need any fancy graphics just print the board in ASCII and make it a two player version.
bubbachuck - February 10, 2004 11:43 PM (GMT)
| QUOTE (TheHawgMaster @ Dec 9 2003, 01:16 AM) |
| Try to create a program that has the user enter three numbers for a quadratic equation in the form of 0 = ax˛ + bx + c and calculates the possible values for x |
How would i go about creating the program that you described........im new to programming and just need some help writing a program similar to that
myork - February 11, 2004 02:44 AM (GMT)
Hope this is a good starting point.
Was not sure how much you needed.
1) mistake in code to make you work for it. :D
| CODE |
#include <iostream>
using std::cout; using std::cin;
void CalculateRootsFor(double a,double b,double c) { int r1,r2; // Some maths stuf here.
// Now we are finished. cout << "The roots of the equation are (" << r1 << " and " << r2 << ")\n"; }
int main(int argc,char* argv[]) { cout << "Calculating possable values for x\n" "In the equation 'ax^2 + bx + c = 0'\n" "\n";
double a,b,c;
cout << "Please Enter Value for 'a':\n"; cin >> a;
cout << "Please Enter Value for 'b':\n"; cin >> b;
cout << "Please Enter Value for 'c':\n"; cin >> c;
CalculateRootsFor(a,b,c); return(0); }
|
ih8censorship - February 11, 2004 02:57 AM (GMT)
| QUOTE |
| Up to this point I have only wrote stupid math programs |
hey.. im writing a stock sim that when finished will have a real world mode and a fake world modes, be able to research, and a bunch of other stuff. and all it is is just buttons and textboxes and a whole lot of math algorithms.