Posts

Showing posts from April 23, 2013

Calculate the Series

visit the problem source :  #include <stdio.h> #include<conio.h> int main () { int n,i,s,p,j; clrscr(); printf("Enter your range(n) :"); scanf("%d",&n); p=1; for (i=1;i<=n;i++) { s=0; for (j=1;j<=i;j++) { s=s+i; } p*=s; } printf("\n The value of p is =%d",p); getch(); return 0; } sample input/output: input : 4 output : The value of p is =576