HomeRegisterLog in

Share | 
 

 [C++] Math

View previous topic View next topic Go down 
AuthorMessage
Desu
Member
Member
avatar

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

PostSubject: [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.
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
avatar

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

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

where to put the codes what program?

________________________________________
Hello
Back to top Go down
Desu
Member
Member
avatar

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

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

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

PostSubject: 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?

________________________________________
Hello
Back to top Go down
Desu
Member
Member
avatar

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

PostSubject: 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.
Back to top Go down
http://www.programmingwish.net
MrJohn10210
Site Monster
Site Monster
avatar

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

PostSubject: 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

________________________________________
Hello
Back to top Go down
Sponsored content




PostSubject: Re: [C++] Math   

Back to top Go down
 
[C++] Math
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» Math Olympiad. [[ 11/5/11 ]]
» I literally passed math with 2 points
» To all math genii
» Math-hammering the Spartan to death
» Math Denial

Permissions in this forum:You cannot reply to topics in this forum
 :: Technology and Software :: Programming-
Jump to:  
Free forum | Games | Other Roleplay games | © phpBB | Free forum support | Contact | Report an abuse | Free forum