Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- problema 1684
- #include <iostream>
- using namespace std;
- int main()
- {
- int n,x,s=0;
- cin>>n;
- x=1;
- while (n!=0){
- s=s+(x*x);
- cout<<s<<" ";
- x++;
- n--;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement