Computer Science, asked by sai884822, 5 months ago

write a program to compute Square of anumber​

Answers

Answered by jameshul471
0

Answer:

C Exercises: Calculate n terms of square natural number and their...

Sample Solution:

C Code: #include <stdio.h> void main() { int i,n,sum=0; printf("Input the number of terms : "); scanf("%d",&n); printf("\nThe square natural upto %d terms are :",n); for(i=1;i<=n;i++) { printf("%d ",i*i); sum+=i*i; } printf("\nThe Sum of Square Natural Number upto %d terms = %d \n",n,sum); }

Explanation:

HOPE IT WILL HELP YOU

PLEASE MARK ME AS BRAINLEST AND FOLLOW ME PLEAZZZZZ

Similar questions
Math, 9 months ago