CS - p=p+2; sum=t*4; z=z-1; x=x+1; } if(z==1) { t=t+1/p;...

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

View Full Document Right Arrow Icon
#include<iostream> # using namespace std; u void main() { double sum,t,p; int x,y,z; y=1; z=2; t=1; p=3; sum=4*t; x=1; while(x<19) { if(z==2) { t=t-1/p;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: p=p+2; sum=t*4; z=z-1; x=x+1; } if(z==1) { t=t+1/p; p=p+2; sum=t*4; z=z+1; x=x+1; } } printf(&quot;PIE=%f\n&quot;,sum); p }...
View Full Document

This note was uploaded on 10/04/2011 for the course CS 142 taught by Professor Staff during the Spring '08 term at BYU.

Ask a homework question - tutors are online