CE 311K Lab3 Report - Mean2=(Math2+Sci2+Eng2)/N_Sub

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab3. Rounding and Mixed Mode Operation Margaret M. Thompson Section No. 14885 01/29/08 1. SCREEN PRINT OUT 2. CODE ! ======================================================== ! CE311K Introduction to Computer Methods ! Lab3 - Mixed-mode operation ! Programmed by Leonardo A. Ramirez ! Revised by Margaret Thompson ! 1/29/08 ! ======================================================== Program mixed ! Declaration of variables N_Stu=4 N_Sub=3 Math1=7.8; Math2=8.1; Math3=6.5; Math4=6.6 Sci1=8.6; Sci2=8.5; Sci3=8.0; Sci4=8.2 Eng1=7.5; Eng2=7.2; Eng3=9.0; Eng4=7.4 ! Open a data file Open (unit=6, file='average.dat', status='unknown')
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
! Average Calculations Avg_Math=(Math1+Math2+Math3+Math4)/N_Stu Avg_Sci=(Sci1+Sci2+Sci3+Sci4)/N_Stu Avg_Eng=(Eng1+Eng2+Eng3+Eng4)/N_Stu Mean1=(Math1+Sci1+Eng1)/N_Sub
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Mean2=(Math2+Sci2+Eng2)/N_Sub Mean3=(Math3+Sci3+Eng3)/N_Sub Mean4=(Math4+Sci4+Eng4)/N_Sub CLAVG1=(Mean1+Mean2+Mean3+Mean4)/N_Stu CLAVG2=(Avg_Math+Avg_Sci+Avg_Eng)/N_Sub print*, "Ave Math=", Avg_Math print*, "Ave Sci=", Avg_Sci print*, "Ave Eng=", Avg_Eng print*, "Mean1=", Mean1 print*, "Mean2=", Mean2 print*, "Mean3=", Mean3 print*, "Mean4=", Mean4 print*, "Class Ave 1=", CLAVG1 print*, "Class Ave 2=", CLAVG2 write (6,*) "Ave Math=", Avg_Math write (6,*) "Ave Sci=", Avg_Sci write (6,*) "Ave Eng=", Avg_Eng write (6,*) "Mean1=", Mean1 write (6,*) "Mean2=", Mean2 write (6,*) "Mean3=", Mean3 write (6,*) "Mean4=", Mean4 write (6,*) "Class Ave 1=", CLAVG1 write (6,*) "Class Ave 2=", CLAVG2 End 3. OUTPUT FILE...
View Full Document

Page1 / 3

CE 311K Lab3 Report - Mean2=(Math2+Sci2+Eng2)/N_Sub

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online