0
cant get the answer ..when i run it just returns enter frst nmber enter second number and the sum is.....
#include <iostream> using namespace std; main() { int a,b,c; cout<<"Enter first number"; cin >> a; cout<<"Enter second number"; cin >> b; c =a+b; cout<<"The sum is<< c"; }
2 ответов
+ 1
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter first number\n";
cin >> a;
cout<<"Enter second number\n";
cin >> b;
c =a+b;
cout<<"The sum is "<<c;
return 0;
}
you had the variable c in the string rather than actually calling it's value
0
tnks it works fine now