Skip to content

Commit

Permalink
Merge pull request #29 from Vansh17555555/main
Browse files Browse the repository at this point in the history
added sum of sqaures
  • Loading branch information
RoSPinoT authored Nov 19, 2022
2 parents 7277b8e + 5d978bf commit 855b30e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sumofsquareofn.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include<stdio.h>
int main () {
int n,sum;
printf("enter value of n :");
scanf("%d",&n);
sum=n*(n+1)*(2*n+1)/6;
printf("sum of the square of n numbers is %d",sum);
return 0;
}

0 comments on commit 855b30e

Please sign in to comment.