CS - p=p 2 sum=t*4 z=z-1 x=x 1 if(z==1 t=t 1/p p=p 2...

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("PIE=%f\n",sum); p }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online