How to change c program into c++ example plz?

c program = write a program print the sum of natural number? #include<stdio.h> #include<conio.h> void main() { int i=1, sum=0; while(n<=10) sum=sum+n; n++; } printf("the sum is %d",sum); } please friends could you change program into c++ thankyou......... i did "C"... show more c program = write a program print the sum of natural number?

#include<stdio.h>
#include<conio.h>
void main()
{
int i=1, sum=0;
while(n<=10)
sum=sum+n;
n++;
}
printf("the sum is %d",sum);
}
please friends could you change program into c++ thankyou.........
i did "C" program i will do c++ before that i want to practice c++ and also C" plz sorry ifi did mistakes in the program which i wrote above thankssssss
8 answers 8