big question in numbers are prime together

hi gentles, i have a code that doesn't work.and i want you helping for the shortest code quickly. It's maddening me. it shows numbers ( less than 20 ) are prime together (two numbers have no parallel multiples ) . And i want you helping for a right code. The output should be like this:
2 and 3
2 and 5
2 and 7
...
18 and 19
thanks much ,if you can help to end it before tommorrow.
There is no need to post the same question multiple times.
http://www.cplusplus.com/forum/beginner/148278/
Topic archived. No new replies allowed.