write a program to print the square of numbers
Answers
Answered by
1
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); } ...
Flowchart:
Similar questions