Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program linearfunction
- real::a,b
- print*,'Linear function --- A*X = B'
- print*,'A value:'
- read*,a
- print*,'B value:'
- read*,b
- if (a .eq. 0)then
- if (b .eq. 0)then !a = 0,b = 0
- print*,'X = Reals' !X = 0/0 ----> Reals
- elseif (b .ne. 0)then !a = 0,b = 4
- print*,'X = Not exist' !X = 4/0 ---> Not exist
- end if
- elseif(a .ne. 0)then !a = 3,b = 5
- print*,'X = ',b/a !X = 5/3 ----> 1,6666...
- end if
- end program linearfunction
Add Comment
Please, Sign In to add comment