in school we only learn python and I want to learn c++ on my own. I have learned basics and now I try to solve problems from my textbook in both languages.
n = int(input())
b=0
c=0
for i in range (1,n+1):
    b += i
    for j in range (1,i+1):
        c += j 
print(b,c)
This is in python and it works perfectly but when i try to transcipt it to c++ I don't get the good result:
for (i=1;i<a+1;i++)
    d = d+i;
    for (n=1;n<i+1;n++)
        c = c+n;
(I have not transcripted whole c++ code because it is much longer than python and just inpunts and outputs so I just took the nested loop) What am I doing wrong? please help
 
     
     
    