Skip to content

Commit

Permalink
Update sq n natural.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
STARK-404 authored Feb 5, 2024
1 parent 5b372c5 commit b463fe2
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions sq n natural.cpp
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
#include<iostream>

using namespace std;

int main()

{

int n,sum=0;

cout<<"\n enter a positive integer\n";

cin>>n;

for(int i=1; i<=n; ++i)

sum+= i*i;

{

}

cout<<" sum of squares is "<<sum;

return 0;

}

0 comments on commit b463fe2

Please sign in to comment.