# MATH

WRITE A SIMPLE BUT A COMPLETE FORTRAN PROGRAM TO COMPUTE THE AVERAGE OF SIX NUMBERS AND DISPLAY THE NUMBERS, SUM AND AVVERAGE. THE PROGRAM SHOULD TERMINATE WHEN ZERO IS ENTERED AS A NUMBER. THE PROGRAM SHOULD BE EDUCATIVE

1. 👍 0
2. 👎 0
3. 👁 267
1. Program math
Integer:num1,num2,num3,num4,num5,num6,sum,averag
Write (*,*)'enter six numbers'
Read (*,*) num1, num2, num3, num4, num5, num6
Sum = num1+num2+num3+num4+num5+num6
Average = sum / 2
Write (*,*)'the sum is ',sum
Write (*,*)'the average is', average

1. 👍 0
2. 👎 0
2. PROGRAM SMILE
Real:: A, B, C, D, E, F,SUM,AVE
WRITE (*,*) 'ENTER THE NUMBERS'
READ(*,*) A, B, C, D, E, F
IF (A = 0) .OR. (B = 0) .OR. (C=0) .OR. (D = 0) .OR. (E = 0) .OR. (F = 0) THEN
END
ELSE
SUM= A+B+C+D+E+F
AVE= SUM/6
ENDIF
WRITE (*,*) 'THE SUM IS ', SUM, 'AND AVERAGE IS ', AVE
END

1. 👍 0
2. 👎 0

## Similar Questions

1. ### gtuc

1. WRITE A PROGRAM TO CALCULATRE THE AREA OF A RECTANGLE OF LENGTH =5 CM AND BREADTH=8CM. 2. CALCULATE THE PRICE OF AN ITEM COSTING 100 GHANA CEDIS AFTER A DISCOUNT OF 10% IS APPLIED TO IT. 3. WRITE A PROGRAM TO CALCULATE THE

2. ### Computer science

need help how do this program. Use the top-down modular approach and pseudocode to design a suitable program to solve it. Alberta Einstein teaches a business class at Podunk University. To evaluate the students in this class, she

3. ### PM

You are creating a customer database for Modesto Nuts minor league baseball team. Draw a project network given the information below. Complete the forward and backward pass, compute activity slack, and identify the critical path.

4. ### java programming

Test Average and Grade Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Write the following methods in the program: •

1. ### Programming

Write a pseudocode program that asks the user for an integer between 1 and 12. The program is to calculate the times table for that number. So for example, if the user enters a 2, then the program has to calculate 2x1 and display

2. ### Maths

Write a fortran 77 program that can display the score and the average score of 50 student

3. ### c++

write a program that reads ten numbers, computes their average and find out how many numbers are above average.

4. ### programming

2-5 Grade Determination is says " Write a program that will input three test scores. the program should determine and display their average. the program should then display the appropriate letter grade based on there average. the

1. ### programming in c++

a program in c++ that accepts exam marks for 10 students and stores them in an array.the program should then calculate and utput the average marks for the class.and give an account of marks below average and output all marks above

2. ### Programming

I suppose to write a program that calculates the average of up to 50 numbers input by the user and stored in an array. The program should use a class name Statistics and have an AddNumber method that stores numbers into an arrey

3. ### computer science

Write a program that prompts the user to input three numbers. The program should then output the numbers in non-descending order

4. ### Programming

2. Then it should prompt the user for the input file name of the file containing the data to sort. 3. If the program can't open the file or if no file name is entered (^d or ^z is entered for EOF), it should print an error message