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?