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