Desu Member
Posts : 27 Rep : 0 Join date : 2010-10-01 Age : 27 Location : Office
| Subject: [C++] Math Wed Oct 27, 2010 6:43 pm | |
| First you start off with your #includes. - Code:
-
#include <iostream> #include <math.h> Now after that, you add this. - Code:
-
using namespace std; You always need that. Now for the function(Main). - Code:
-
int main() { int a, b, total; a and b are going to be the numbers you want to be. Now we add it. - Code:
-
cout << "Enter a number you want to add " << endl; cin >> a >> b;
Like again, a and b are the numbers you want. Now after that, here was we need to give us the answer. - Code:
-
total = a + b; cout << "The total sum is : " << total << endl; system("PAUSE"); return 0; }
If I didn't explain good, feel free to pm me. | |
|
MrJohn10210 Site Monster
Posts : 107 Rep : 3 Join date : 2010-09-30
| Subject: Re: [C++] Math Thu Oct 28, 2010 5:00 am | |
| where to put the codes what program? | |
|
Desu Member
Posts : 27 Rep : 0 Join date : 2010-10-01 Age : 27 Location : Office
| Subject: Re: [C++] Math Thu Oct 28, 2010 6:55 pm | |
| - MrJohn10210 wrote:
- where to put the codes what program?
Can't you read the topic? [C++] | |
|
MrJohn10210 Site Monster
Posts : 107 Rep : 3 Join date : 2010-09-30
| Subject: Re: [C++] Math Thu Oct 28, 2010 7:00 pm | |
| - Desu wrote:
- MrJohn10210 wrote:
- where to put the codes what program?
Can't you read the topic? [C++] yea i can but is that a program? | |
|
Desu Member
Posts : 27 Rep : 0 Join date : 2010-10-01 Age : 27 Location : Office
| Subject: Re: [C++] Math Sat Oct 30, 2010 7:24 pm | |
| - MrJohn10210 wrote:
- Desu wrote:
- MrJohn10210 wrote:
- where to put the codes what program?
Can't you read the topic? [C++] yea i can but is that a program? It's in the programming place. It's named C++, no shit that's the name. | |
|
MrJohn10210 Site Monster
Posts : 107 Rep : 3 Join date : 2010-09-30
| Subject: Re: [C++] Math Wed Nov 03, 2010 4:47 am | |
| - Desu wrote:
- MrJohn10210 wrote:
- Desu wrote:
- MrJohn10210 wrote:
- where to put the codes what program?
Can't you read the topic? [C++] yea i can but is that a program? It's in the programming place. It's named C++, no shit that's the name. well sorry | |
|