0

How to add 2 numbers??

20th Aug 2017, 12:38 AM
MONISHA K
MONISHA K - avatar
3 ответов
+ 5
By using the plus sign. Looks like: + Example/ int sum = 5 + 2;
20th Aug 2017, 12:42 AM
Rrestoring faith
Rrestoring faith - avatar
+ 2
(in C++) #include <iostream> using namespace std; int main() { int a = 15; int b = 10; cout << (a + b); return 0; } replace a, b, 10 and 15 with something of your choice if you want the sum of what the user writes: #include <iostream> using namespace std; int main() { cin >> a; cin >> b; cout << (a + b); return 0; } again, replace a and b with something of your choice
20th Aug 2017, 1:18 PM
ReimarPB
ReimarPB - avatar
+ 1
Something called plus sign. Search it on Google... And if you wanna get more complicated, check this. https://code.sololearn.com/c31yeylQ5Dnt/?ref=app
20th Aug 2017, 10:48 AM
Dragon Slayer Xavier
Dragon Slayer Xavier - avatar