language: Fortran (gfortran-4.3.4)
date: 118 days 15 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
program DangerousMath
!-------------------------------------------------------------------------
!Tyler Martin                   Engr 225 Lab 2             25 January 2012
!                               Dangerous Math Program
!-------------------------------------------------------------------------
Implicit None
integer, parameter::dp=selected_real_kind(15)
        real(dp) :: A, B, C, x, mu
        integer :: I, K, n = 9
        character (10) :: Name
                A=3
                B=(n+3)/5
                x=5.75
                I=3.1415959
                K=x/2.0
                mu=1./5.75
 
write (*,*) "Please human, enter your name."
read (*,*) Name
write (*,*) "Hello ", Name
write (*,*)a,b,x,I,k,mu
 
write (*,*) "Enter a value for A and B"
read (*,*) A, B
C = ((A + B)**2 - 2*A*B - B**2)/A**2
write (*,*) C
 
stop
end program DangerousMath
 
  • upload with new input
  • result: Success     time: 0.01s    memory: 2620 kB     returned value: 0

    Tyler
    0.01, 888.0
    
     Please human, enter your name.
     Hello Tyler     
       3.0000000000000000        2.0000000000000000        5.7500000000000000                3           2  0.17391304671764374     
     Enter a value for A and B
       1.0000000003174137     
    
Mixed Math Concept Check