CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 06:02:50 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=efa084c8383863d8274d00faff8b55f20cfa2a0ef0fb22a58493caaf2b4f7f89a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22PIRXdT9BzqOrGk_kNkMFIcSefqT60wEO%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cc26a0a8fb335a-BLR
c Main menu PROGRAM main IMPLICIT NONE INTEGER comma - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c Main menu
- PROGRAM main
- IMPLICIT NONE
- INTEGER command
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- COMMON / flag / is_triangle_created
- REAL calculate_area, find_min_angle, min_angle_cos
- REAL a, b, alpha
- REAL PI, beta
- LOGICAL is_triangle_created
- is_triangle_created = .FALSE.
- PI = 3.1415927
- PRINT *, '1. Create new triangle.'
- PRINT *, '2. Calculate area.'
- PRINT *, '3. Find minimal angle.'
- PRINT *, '4. Find cosin of minimal angle.'
- PRINT *, '5. Exit.'
- c Delete this
- PRINT *, '6. (temp) Show triangle params.'
- c Delete this
- 1 PRINT *, '>> '
- READ *, command
- IF(.NOT. is_triangle_created .AND.
- + (command .EQ. 2 .OR. command .EQ. 3 .OR. command .EQ. 4)) THEN
- PRINT *, 'Error: triangle is not created.'
- GOTO 1
- ENDIF
- SELECT CASE (command)
- CASE (1)
- CALL input_triangle
- CASE (2)
- PRINT *, 'Area = ', calculate_area()
- CASE (3)
- PRINT *, 'Minimal angle = ', find_min_angle()
- CASE (4)
- PRINT *, 'Minimal angle cosin = ', min_angle_cos()
- CASE (5)
- GOTO 2
- CASE (6)
- c Delete this
- CALL write_triangle
- c Delete this
- CASE default
- PRINT *, 'Unexpected command'
- END SELECT
- GOTO 1
- 2 END
- c Triangle creation
- SUBROUTINE input_triangle
- IMPLICIT NONE
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- COMMON / flag / is_triangle_created
- REAL a, b, alpha
- REAL PI, beta
- LOGICAL is_triangle_created
- 3 PRINT *, 'Enter [a] [b] [alpha]:'
- READ *, a, b, alpha
- IF(a .LE. 0 .OR. b .LE. 0 .OR. alpha .LE. 0 .OR.
- + (a .LE. b*SIN(alpha * PI/180))) THEN
- PRINT *, 'Error: triangle is not exist'
- GOTO 3
- ENDIF
- is_triangle_created = .TRUE.
- PRINT *, 'Triangle is created'
- END
- c Area calculation
- REAL FUNCTION calculate_area()
- IMPLICIT NONE
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- REAL a, b, alpha
- REAL PI, beta
- beta = ASIN(b/a * SIN(alpha * PI/180)) * 180/PI
- calculate_area = 0.5 * a * b * SIN((180 - beta - alpha) * PI/180)
- RETURN
- END
- c Minimal angle finding
- REAL FUNCTION find_min_angle()
- IMPLICIT NONE
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- REAL a, b, alpha
- REAL PI, beta
- REAL gamma, minv
- beta = ASIN(b/a * SIN(alpha * PI/180)) * 180/PI
- gamma = 180 - alpha - beta
- minv = alpha
- IF (beta .LT. minv) THEN
- minv = beta
- ENDIF
- IF (gamma .LT. minv) THEN
- minv = gamma
- ENDIF
- find_min_angle = minv
- RETURN
- END
- c Calculate cosin of minimal angle
- REAL FUNCTION min_angle_cos()
- IMPLICIT NONE
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- REAL a, b, alpha
- REAL PI, beta, find_min_angle
- min_angle_cos = COS(find_min_angle() * PI/180)
- END
- c Delete
- SUBROUTINE write_triangle
- COMMON / input / a, b, alpha
- COMMON / utility / PI, beta
- REAL a, b, alpha
- REAL PI, beta
- PRINT *, 'a = ', a
- PRINT *, 'b = ', b
- PRINT *, 'alpha = ', alpha
- END
- c Delete
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ O
JavaScript | 1 sec ago | 0.24 KB
-
⭐✅ Online Marketplace Exploit ✅ NEVER SEEN BE...
JavaScript | 4 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D A⭐⭐
Java | 4 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 4
JavaScript | 9 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ 8
JavaScript | 12 sec ago | 0.24 KB
-
⭐✅ Trading Profit Method ✅ NEVER SEEN BEFORE...
JavaScript | 14 sec ago | 0.24 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 16 sec ago | 0.10 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ T
JavaScript | 20 sec ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand