Help with a "for loop" for assigment

So i have to write a program for uni that reads a number on a pcb, takes a number in argv[1] adds it to the number read from the pcb and increments it by a number in argv[2]. eg, if the number read from the pcb is 2 and the argv value are "5 3" the cout should read "7, 13, 18." if the number read from the pcb is 12 and the argv values are "2 4", then the cout should be "14, 16, 18 20" but i cant get it working.

I can get it to read the pcb and add argv[1] to it once and cout it. But i cant get it to increment argv[2] times. It's primarily the for loop at the end i think that isn't right. Any ideas?


http://pastebin.com/Dg54kGAk
Last edited on
You didn't have ten seconds to edit out the text that Reddit adds around your post? It's irresponsible to post while being chased by alligators.
Last edited on
Topic archived. No new replies allowed.