Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
HomeLatest imagesRegisterLog in

 

 [C++] Math

Go down 
2 posters
AuthorMessage
Desu
Member
Member
Desu


Posts : 27
Rep : 0
Join date : 2010-10-01
Age : 27
Location : Office

[C++] Math Empty
PostSubject: [C++] Math   [C++] Math EmptyWed 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.
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
MrJohn10210


Posts : 107
Rep : 3
Join date : 2010-09-30

[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math EmptyThu Oct 28, 2010 5:00 am

where to put the codes what program?
Back to top Go down
Desu
Member
Member
Desu


Posts : 27
Rep : 0
Join date : 2010-10-01
Age : 27
Location : Office

[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math EmptyThu Oct 28, 2010 6:55 pm

MrJohn10210 wrote:
where to put the codes what program?
Can't you read the topic? [C++]
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
MrJohn10210


Posts : 107
Rep : 3
Join date : 2010-09-30

[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math EmptyThu 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?
Back to top Go down
Desu
Member
Member
Desu


Posts : 27
Rep : 0
Join date : 2010-10-01
Age : 27
Location : Office

[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math EmptySat 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.
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
MrJohn10210


Posts : 107
Rep : 3
Join date : 2010-09-30

[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math EmptyWed 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
Back to top Go down
Sponsored content





[C++] Math Empty
PostSubject: Re: [C++] Math   [C++] Math Empty

Back to top Go down
 
[C++] Math
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Technology and Software :: Programming-
Jump to:  
Free forum | ©phpBB | Free forum support | Report an abuse | Forumotion.com