daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Dec 7th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.   int n,i,s=0;
  8.   cin>>n;
  9.   for(i=1;i*i<=n;i++)
  10.     s+=i*i;
  11.   cout<<"Rezultatul este "<<s;
  12.  
  13.     return 0;
  14. }
RAW Paste Data
Top