No complet command outputs in mac codeBlocks

0

So i have the program bellow, but the console keeps showing me only my first cout even if i input n, I need some help #include

using namespace std;

void DivizoriCresc1(int n, int d)
{
    cout << " ceva";
    if(d > 0)
    {
        DivizoriCresc1(n, d - 1);
    }
    if(n % d == 0)
    {
        cout << d << " ";
    }
}

int main()
{
    int n;
    cout << "n =";
    cin >> n;
        cout << " ceva";
    DivizoriCresc1(n, n);
        cout << " ceva";

    return 0;
}

Last login: Wed Nov 21 16:11:42 on ttys000 MacBooks-MacBook-Pro:~ macbook$ /Users/macbook/Desktop/CodeBlocks.app/Contents/MacOS/cb_console_runner DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:. /Users/macbook/CodeBlocksProject/tema1/bin/Debug/tema1 n =50

Process returned -1 (0xFFFFFFFF) execution time : 1.856 s Press ENTER to continue.

MacBooks-MacBook-Pro:~ macbook$

c++
macos
codeblocks
asked on Stack Overflow Nov 21, 2018 by Catalin Catalin

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0