please how can convert this code from C to C++
#include <stdio.h>
int main() {
int N;
for(;scanf("%d",&N) && N!=0;printf("%d => %d\n",N,N*N-N+1));
return 0;
}