Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by goncrazybbaksoon

  1. goncrazybbaksoon

    Fibonacci problem

    Thank you all for your help! I finally came up with a solution, thought I'd put it on here for you to critique... int Fib(int firstvalue, int secondvalue, int ival); void main() { int firstnum=1; //first number of fibonacci scale int secondnum=1; //second number of fibonacci...
  2. goncrazybbaksoon

    Fibonacci problem

    Yes, it's a recursive example, and yes, there are three variables....I thought the nth variable was implied. I tried to follow what Zyrentian had offered, but am lost. Still trying though, any more info you could offer would be helpful!
  3. goncrazybbaksoon

    Fibonacci problem

    I have an assignment to write a program that uses less than 10 lines of code to print out the Fibonacci numbers....i.e.1,1,2,3,5,8,13,21,34,55,89,etc....but for the life of me, I can't find the logic on this one. The instructor said I can do it using only two variables, but I just can't seem to...
  4. goncrazybbaksoon

    parse errors

    I'm getting parse errors on three lines, and I don't see anything wrong with them. I haven't put the code in to display the time yet, so disregard that. The parse errors are on these lines: Clock.addseconds(int sec); Clock.pm('P'); Clock.pm('A'); Can anybody tell me what the problem is? The...
  5. goncrazybbaksoon

    clock using a class?

    //Clock #include <iostream.h> #include <stdlib.h> class time //new data type { public: void setmin(int newmin); void sethour(int newhour); void setsec(int newsec); int getmin(); int getsec(); int gethour(); char am(); char pm()...
  6. goncrazybbaksoon

    clock using a class?

    I need to make a working clock using a class that increments from 12:00:00 am to 11:59:59 pm. I thought I had the right idea in my code, but I'm stuck in some kind of loop that repeatedly prints the same 24 numbers(which I can't see what the connection is) over and over again. I'm not sure...

Part and Inventory Search

Back
Top