Lee_assig13 - for (int v=1 v<=c v++)...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 //Cheu Lee Assig13 #include<iostream> #include<cmath> using namespace std int main() { int n, sum=0 i cout<<"Please enter the value of n: " cin>>n for(int k=1 k<=n k++) sum+=k*k cout<<"The summation is: "<<sum/pow(n,3)<<endl //Summation of n=48 is 0.343822 double c, result=0 { cout<<"Please enter a positive integer: "<<endl cin>>c
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for (int v=1 v<=c v++) result+=(((v*8)/c)*((v*8)/c)+1) cout<<"The summation is: "<<result*(8/c)<<endl //Summation of v=96 is 181.343 double a, q=0 cout<<"Please enter a positive interger: "<<endl cin>>a for(int i=1 i<=a i++){ q+=pow((1+(1/a)),a) cout<<"The first 'a' value is: "<<q<<endl } return 0 } }...
View Full Document

This note was uploaded on 05/16/2010 for the course CISCO EST61 taught by Professor Miller during the Spring '10 term at Fresno City College.

Ask a homework question - tutors are online