Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0125· OpenAIAi2 WildChat-4.8M (AI2)

Write me something in any programming language that is not python

  1. User

    Write me something in any programming language that is not python

  2. Assistant

    // C++ code to find the factorial of a number

    #include using namespace std;

    int factorial(int n) { if(n == 0) { return 1; } else { return n * factorial(n-1); } }

    int main() { int number; cout << "Enter a number: "; cin >> number;

    int result = factorial(number);
    cout << "Factorial of " << number << " is " << result << endl;
    
    return 0;
    

    }

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.