#input and calculate

28 messages · Page 1 of 1 (latest)

open merlinBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.

flint valve
#

First you try. When you get stuck, as a specific question

#

what is the number after return ?

#

The number you send to cout should be displayed, but it is not the return value

gleaming ivy
#

the problem is in

#
cin >> a, b, c;;
#

this actually does:

#
cin >> a;
b; // does nothing
c; // does nothing
#

use

#
cin >> a >> b >> c;
#

^ and do not use bits/stdc++, just #include <iostream>

#

yeah

#

, operator does not really work the way you wanted it to

#

when you write

#

left, right

#

you say:

first evaluate left
then evaluate right

#

so in your case

#

because of operator priority

#

left is cin >> a

#

right is b, not cin >> b

#

oki oki

#

in most cases you do not want to use ,

#

you'll use it when passing function parameters

#

but first get to functions

#

IDK what source you learn from

open merlinBOT
#

@safe cove Has your question been resolved? If so, run !solved :)

#

Thank you and let us know if you have any more questions!