0

need solve

I want to get result 23+ 25= 48, and it should be visible in program

22nd Oct 2016, 9:25 PM
Emon
Emon - avatar
11 odpowiedzi
+ 5
cout << "23 + 25 = " << (23 + 25) << endl; ??
22nd Oct 2016, 9:39 PM
Zeke Williams
Zeke Williams - avatar
+ 2
int a=23, b=25; cout << a << " + " << b << " = " << a + b << endl;
22nd Oct 2016, 10:29 PM
Zeke Williams
Zeke Williams - avatar
+ 2
Thanks boss kro, I wanted that
22nd Oct 2016, 11:35 PM
Emon
Emon - avatar
+ 1
You mean this ? #include <iostream> using namespace std; int main(void) { int a; int b = 10; cout << "Enter a : "; cin >> a; cout << a << "+" << b << "=" << a+b; /* Input : 5 Output : 15 */ return 0; }
22nd Oct 2016, 11:22 PM
Luan Nguyen
Luan Nguyen - avatar
0
I want to see it using a or b... I mean a = 12, b= 13 then output 12+ 13 = 25 but I want to use a & b in my code
22nd Oct 2016, 9:54 PM
Emon
Emon - avatar
0
then use int a=12,b=13; cout << a+b << endl; is this what u want?
22nd Oct 2016, 9:58 PM
Asif Imtiaz Shaafi
Asif Imtiaz Shaafi - avatar
0
shaafi, are u bangaliii??
22nd Oct 2016, 10:04 PM
Emon
Emon - avatar
0
yes..
22nd Oct 2016, 10:06 PM
Asif Imtiaz Shaafi
Asif Imtiaz Shaafi - avatar
0
bangladeshi?
22nd Oct 2016, 10:37 PM
Emon
Emon - avatar
0
cout<<"23 + 25 = "<< (int )23+25
30th Oct 2016, 1:39 PM
Varun
0
and ; in the end
30th Oct 2016, 1:40 PM
Varun