MCA World :: Computer Application ::
Questions :  Answers : Solutions of TMA & Project Assignment  of  MCA courses of IGNOU, NIT & Other Universities.

::: Max Min



Home • Introduction to Software • Data Structures • System Engineering • Database Management System • Discrete Mathematics • Numerical & Statistical Computing • Software Engineering • Operation Research • Accounting & Finance • Computer Architecture • Operating Systems • Intelligent Systems • Relational Database • Obejct Oiented Systems

Max Min

Up • Matrix Multiplication • Factorial • Max Min • Pie chart • Baye's Theorem - Probability • Binomial Theory of Probability • Correlation Calculation

Main Chapters

Home
Introduction to Software
Data Structures
System Engineering
Database Management System
Discrete Mathematics
Numerical & Statistical Computing
Software Engineering
Operation Research
Accounting & Finance
Computer Architecture
Operating Systems
Intelligent Systems
Relational Database
Obejct Oiented Systems

Max Min

3. FORTRAN Program for Mean, Minimum and Maximum Calculation

Write a FORTRAN subroutine MMM that computes the mean, the minimum and the maximum of an array A of N real numbers and prints out the values with suitable messages.

Ans :

It is assumed that the Main or Calling Programs will read the N, the size of the array and values of  array A and no read statements are required for N and A(N) in the subroutine MMM .

Here is listing of the Program:-

C*****SUBROUTINE MMM (A,N)

     C***** COMPUTE THE MEAN & PRINT ITS VALUE

           SUM = 0

      DO 10 I=1,N

 10  SUM = SUM + A(I)

      SMEAN = SUM/N

           WRITE(*,*) 'THE MEAN VALUE = ',SMEAN

 

C***** COMPUTE THE MINIMUM & PRINT ITS VALUE

           SMIN = A(1)

      DO 20 I=2,N

      IF SMIN .LT. A(I) THEN SMIN = A(I)

 20   CONTINUE 

  

           WRITE(*,*) 'THE MINIMUM VALUE = ',SMIN

 

C***** COMPUTE THE MAXIMUM & PRINT ITS VALUE

           SMAX = A(1)

      DO 20 I=2,N

      IF SMAX .GT. A(I) THEN SMAX = A(I)

 20   CONTINUE 

  

           WRITE(*,*) 'THE MAXIMUM VALUE = ',SMAX

      RETURN

           END

Links for Web Developers Web Publishers

 

Links from Google

 

 
 


Home • Introduction to Software • Data Structures • System Engineering • Database Management System • Discrete Mathematics • Numerical & Statistical Computing • Software Engineering • Operation Research • Accounting & Finance • Computer Architecture • Operating Systems • Intelligent Systems • Relational Database • Obejct Oiented Systems



This is complete MCA study materials containing question, solutions, answers, programming, scripts, TMA, Project assignment solutions for aspiring MCA or BCA student. This website may be useful for all in general and IGNOU student in particulars. Disclaimer : Execution and correctness of programs/answers may be established by the users himself and the mcaworld.net shall not held responsible for any damage/loss caused due to the use of code over this site.



Webmaster Bipin Bihari Pandey, An IT Expert of DotNet Technology, MCA from IGNOU
bipin9830@rediffmail.com or bipin9830@yahoo.com