MATH

posted by .

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

  • MATH -

    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

  • MATH -

    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

  • MATH -

    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

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Computer - Programming

    Please do help in providing solution to this question, thanks: Write a Fortran program that requests for three numbers from the keyboard, subtracts 48 from their sum and then divides the result by 6 before sending the output to the …
  2. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
  3. Computer Programing & Logic Design

    Submit pseudocode and a flowchart for the following programming exercise: Largest and Smallest Design a program with a loop that lets the user enter a series of numbers. Theuser should enter -99 to signal the end of the series. After …
  4. Programming

    I need your help to write a program using visual basic 2010 for the following:- write a program that calculates the average of up to 50 numbers input by the user and stored in an arrey. The program should use a class named Statistics …
  5. 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 …
  6. programming

    write a program that performs a survey tally on vehicle. The program should prompt for the next person until a sentinel value of -1 is entered to terminate the program. Each person participating in the survey should choose their favorite …
  7. computer science programming

    Elements – sequence-series outputting Write a program that prints the following elements: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, (hereto referred to as elements) etc., up till a user-entered value. The program should not print more than …
  8. computer programming

    Write a fortran program to compute the geometric information for a kite. The program should read the a, c and p lengths and compute the q length
  9. java programming

    1. Time Calculator Write a program that asks the user to enter a number of seconds. • There are 60 seconds in a minute. If the number of seconds entered by the user is greater than or equal to 60, the program should display the number …
  10. computer programming

    Design the logic for a program that allows a user to enter any amount of numbers up to 10 or until a sentinal value of -1 is entered. Then the program displays the count of the numbers entered and numeric average of the numbers (not …

More Similar Questions