Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

write a C++ prgm to add two numbers?

OpenStudy (anonymous):

@rsadhvika @zepp @nick67

OpenStudy (nick67):

@Yahoo! are you trying to do these programs yourself ? :-) it's much more proficient for you

OpenStudy (anonymous):

I am new to C++ i want to learn all the logical thats why..

OpenStudy (zepp):

It's the same thing as the program we wrote for you before > Declare 3 variables; First for the first number, second for the second number and third for the result > Ask the user to type in the 2 numbers that he wishes to add > Run an operation to add those numbers up > Display the result; output.

OpenStudy (zepp):

And may I ask if you had learned C already? We usually learn C before C++, since both are similar, and learning C will help you a lot when learning C++.

OpenStudy (anonymous):

No i have nt learned c

OpenStudy (zepp):

You should then

OpenStudy (anonymous):

but that is not there in my syllabus

OpenStudy (anonymous):

i in +1

OpenStudy (zepp):

I'm disappointed :(

OpenStudy (anonymous):

why??

OpenStudy (zepp):

cuz C ish cool

OpenStudy (anonymous):

i heard c is more complicated than C++

OpenStudy (zepp):

It's not

OpenStudy (anonymous):

i think u r a master in C

OpenStudy (zepp):

Not really :P

OpenStudy (zepp):

I know the basics, not more advanced stuffs

OpenStudy (anonymous):

@zepp hw to add numbers

OpenStudy (anonymous):

can u show that plzz

OpenStudy (zepp):

#include <iostream> using namespace std; int main() { double a, b; cout << "First number?"; cin >> a; cout << "Second number?"; cin >> b; int const result(a + b); cout << result << endl; //Display result return 0; }

OpenStudy (zepp):

http://puu.sh/M9mg 1 + 1 = 2!!

OpenStudy (anonymous):

go to www.newboston.org u can learn better @Yahoo!

OpenStudy (anonymous):

thrz an easy way

OpenStudy (anonymous):

can u show that

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!