Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

CuTee Simple factorial

  1. Apr 15, 2006 #1
    //int input;

    void Factor::init(){
        InputEdit->setValidator(new QDoubleValidator(InputEdit));


    int Factor::factorials(int n){
        if(n<=1) return 1;
        return n*factorials(n-1);

    void Factor::FactorNumber()
        int input=InputEdit->text().toDouble();
    *** 2 edit boxes: InputEdit for input number; FactorialDisplay to display factor "in action"
    *** 1 button called FactorButton implements factorNumber() connecting to the main form named Factor.

    No errors but program run wild when unfactorable number is used and my text edit box does display factoring process till input equals 1

    Help me with this little problme plz.
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Threads - CuTee Simple factorial Date
Some simple problem with my GUI? Nov 8, 2017
Python Simple python database Sep 19, 2017
Creating a simple text parser/compiler Jun 28, 2017
C/++/# Creating a simple password program in C++ May 19, 2017
ROOT TMVA::factory weights Aug 4, 2015