0

is it true?

#include <iostream> using namespace std; int main() { int a; int b; int p = a + b; cout<<"inter a number"; cin>>a/n; cout<<"inter another number"; cin>>b/n; cout<<p; return 0; }

4th May 2018, 6:14 PM
Amir Fall
Amir Fall - avatar
7 odpowiedzi
+ 2
#include <iostream> using namespace std; int main() { int a; int b; cout<<"inter a number" << endl; cin >> a; cout<<"inter another number" << endl; cin >> b; cout << a+b; return 0; } I didn't know what the n is so I removed "n".
4th May 2018, 6:21 PM
Disvolviĝo;
Disvolviĝo; - avatar
+ 2
Programanta ludanto I'm guessing the /n is suppose to be a line break. Although it's implemented wrong. Amir Fall You need to do '\n' not /n.
4th May 2018, 8:36 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
+ 1
thanks 💟
4th May 2018, 6:24 PM
Amir Fall
Amir Fall - avatar
+ 1
What do you mean by is it true? This function won't output a boolean. And I doubt that'll even compile considering how many errors are in the code.
4th May 2018, 8:37 PM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar
0
a/n and b/n are not lvalue and what is "n"?
4th May 2018, 6:17 PM
Disvolviĝo;
Disvolviĝo; - avatar
0
please right true ☺❤
4th May 2018, 6:19 PM
Amir Fall
Amir Fall - avatar
0
#include <iostream> using namespace std; int main() { int a; int b; int p = a + b; cout<<"inter a number\n"; cin>>a; cout<<"inter another number\n"; cin>>b; cout<<p; return 0; }
4th May 2018, 6:27 PM
Nirkasder
Nirkasder - avatar