How to make executable type file with xcode?

So I made the Folowing program:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <iostream>
using namespace std;

int main()
{
    cout << "You Have 3 Guesses to guess the right number\nGuess The Number";
    int x;    
    cin >>x;
    if(x > 5)
        cout << "The Number is Too Damn High!";
    bool nNumber = false;
    if(x < 5)
    {
        cout << "The Number is Too Damn Low!";
      nNumber = false;
    }
    if(x == 5)
    {
        cout << "The Number is Just Perfect!";
    nNumber = true;
    }
    
    if(nNumber == true)
        cout << "You Won the Game!";
    if(nNumber == false)
        
    {
        cout << "\nGuess Again!";
    cin >>x;
    if(x > 5)
        cout << "The Number is Too Damn High!";
    nNumber = false;
    }
    if(x < 5)
    {
        cout << "The Number is Too damn Low!";
    nNumber = false;
    }
    if (x == 5)
    {
        cout << "The Number is Just Perfect!";
    nNumber = true;
    }
    
    if(nNumber == true)
        cout << "You Won the Game!";
    if(nNumber == false)
    {
        cout << "\nGuess Again!";
    cin >>x;
    }
    if(x > 5)
    {
        cout << "The Number is Too Damn High!";
    nNumber = false;
    }
    if(x < 5)
    {
        cout << "The Number is Too damn Low!";
    nNumber = false;
    }
    if(x == 5)
        cout << "The Number is Just Perfect!\nYou Won the Game!";
       if(x != 5)
            cout << "\nYou Suck!\nI'll Never Tell You The Number!" << endl;

}

(I know its overly redundant,and i could make it shorter with loops & such, but i have a lot of time)
I just would like to know how I could make the equivelent of a .exe, but that would work on my mac,and something that would work on windows.
and i need to fix a bug with entering a correct answer before the last time,but nevermind that
Topic archived. No new replies allowed.