C++ Primer Error

Those of you who own C++ Primer 5th Edition
I really could use some help.

On if statements on the getting started chapter it shows a programme which
Uses while loops embedded with if statements

Well it gives me a error when I compile it i wrote it by hand
At first then I found a error then I copy and pasted still a error

The IDE in using is CodeBlocks
And my compiler supports C++11

The programme was meant to be given numbers
And say how much they are for eg

We type in the input for the loop

10 10 20 20

It will output 10 2 times
20 2 times

Should I just skip the page that it gave me a error

Than you and appreciate it for looking at this comment
Just got that book, copypasted and it worked. What error do you have? Post code here, maybe you did something wrong. Here is code I copied on Ideone: http://ideone.com/HsgTEZ
But when It still excites but all are 0s

I have to move the curly brace I make it work but its still a bit tedious

Is it my compilers fault I use CodeBlocks
Post code you use.
I have to move the curly brace
Are you sure you did it corrrectly? Because I found the different copies of the book and every one contained same code which worked perfectly. I use C::B with MinGW compiler too.
Topic archived. No new replies allowed.