Write a program using for loop to find the sum of the squares of the integers from 1 to n. Where n is a positive value entered by user.

#include<iostream>
using namespace std;
int main()
{
int i,n,sum=0;
cout<<“Enter the number: “;
cin>>n;
for(i=0;i<=n;i++)
{
sum=sum+(i*i);
}
cout<<“The sum of squares of the numbers is: “<<sum;
}