+ 7
I Need Help!!! I don't understand this at all???
Can someone help me? I don't understand this??? every time i put this code in, the output say "No Output." can someone tell me why? Here is the code: #include <iostream> using namespace std; int main() { int a = 30; int b = 15; int sum = a + b; return 0; }
10 Respostas
+ 22
Because you are not outputting anything.
cout << sum
+ 14
This is correct...check this code below..
#include<iostream>
using namespace std;
int main()
{
int a=30;
int b=20;
int sum=a+b;
cout<<sum;
return 0;
}
output:
50
+ 4
Stormtrooper957 You really need to work on your foundamentals.
int sum = a + b;
cout<<sum;
+ 4
Zeke Williams and madhina, and everyone else, thanks for the help :) its helped me a lot.
+ 2
i tried that, but it didn't work. this is what i did (my code is below) is this what i have to do or can you show me?
#include <iostream>
using namespace std;
int main()
{
int a = 30;
int b = 15;
cout << sum = a + b;
return 0;
}
+ 2
You can even do it this way too:
cout << a + b;
+ 2
use
cout <<
it is used for giving output
+ 1
well i guess i just didn't care about fundamentals, Silly me. anyways Thanks Jakub Stasiak, it worked :) It doesn't show that in the C++ tutorial in SoloLearn. weird :/
+ 1
int sum=a+b;
count<<sum;
+ 1
whats up guys! how do i get the ball rolling here