storing variables.

Hi!

Can anyone help me identify what does these statement means?
"zero count. minus sum. plus sum."

Thanks!
Last edited on
So, it looks like you've been given some pseudo code to translate into code.

These zero_count minus_sum plus_sum are the names of the variables they want you to use to store these particular quantities. zero_count stores how many times x had a zero input. minus_sum stores the sum of all the negative inputted values of x. Finally, plus_sum stores the sum of all the positive inputted values of x. The rest of the statement is in English, so there should be no trouble understanding that.

Good luck!
What does store means? How do I store?
Can you give me an example on how to use these names for me to store?

Sorry I am really a beginner :((

First, read these:

http://www.cplusplus.com/doc/tutorial/program_structure/
http://www.cplusplus.com/doc/tutorial/variables/

When I mean "store", I mean how a variable in a C++ program is used to store data.

For instance:

1
2
3
4
5
6
7
8
9
10
11
12
int main()
{
     int x = 0; //here, x stores the value 0

     bool b = true; //here, b stores the boolean value true

     x++; //now, x stores the value 1

     int zero_count = 0; //here, zero_count stores the value 0

     return 0; //end of program
}
Last edited on
ok thanks!
Topic archived. No new replies allowed.