chap 4 notes 9 - Alternative Methods The if statement in...

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

View Full Document Right Arrow Icon
Alternative Methods if ( !n ) ave = 0 . 0 ; else ave = sum / n; if ( n = 0 ) ave = 0 . 0 ; else ave = sum / n; if ( n != 0 ) ave = sum / n; else ave = 0 ; if ( n != 0 ) ave = sum / n; The
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/16/2011 for the course COP 2271 taught by Professor Staff during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online