EEE@ - i = 2 Line 12 printf"After%d iterations sum =.8f\n" int(i-1/2 sum Line 15 return 0}

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

View Full Document Right Arrow Icon
#include <stdio.h> int main ( int argv , char ** argc ) { double i ; double sum = 0; // Line 7 for (i=1; i<50 000 000;) // Line 9 { sum = sum + 4.0 / i; i += 2; // Line 11 sum = sum - 4.0 / i;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: i += 2; // Line 12 } printf( "After %d iterations sum = %.8f\n" , ( int )(i-1)/2, sum); // Line 15 return 0; }...
View Full Document

This note was uploaded on 07/18/2011 for the course EE 4720 taught by Professor Staff during the Spring '08 term at LSU.

Ask a homework question - tutors are online