Fortran Problem List
Fortran Problem List
Programming in FORTRAN
1. Write a Fortran program to calculate the area of a triangle, circle, and rectangle.
2. Write a Fortran program to convert the given temperature in Fahrenheit to Celsius and vice
versa.
3. Write a Fortran program to determine whether a given year is leap year or not.
4. Write a Fortran program to calculate factorial of a given number.
5. Write a Fortran program to determine the following:
(a) 1+2+3+ … … +n; (d) 1+3+5+ … … +2n-1;
(b) 12 + 22 + 32 + … … + n2 ; (e) 2+4+6+ … … +2n;
(c) 13 + 23 + 33 + … … + n3 ;
6. Write a Fortran program to identify the nature of the conic:
ax 2 + 2hxy + by 2 + 2 gx + 2 fy + c = 0 .
Page 1 of 2
15. Write a Fortran program to read and obtained mark of a course between 1 and 100 and
calculate the grade and grade point as follows:
Mark ≥ 80 ‘A+’; Mark ≥ 75 ‘A’; Mark ≥ 70 ‘A-’; Mark ≥ 65 ‘B+’; Mark ≥ 60 ‘B’; Mark ≥
55 ‘B-’; Mark ≥ 50 ‘C+’; Mark ≥ 45 ‘C’; Mark ≥ 40 ‘D’; Mark ≤40 ‘F’.
16. Write a Fortran program to calculate the GPA for a first-year student in the Mathematics
Department for 10 courses. A course's grade and grade points are as follows:
Marks ≥ 80% ‘A+’ ‘4.00’; Marks ≥ 75% ‘A’ ‘3.75’; Marks ≥ 70% ‘A-’ ‘3.50’; Marks ≥ 65%
‘B+’ ‘3.25’; Marks ≥ 60% ‘B’ ‘3.00’; Marks ≥ 55% ‘B-’ ‘2.75’; Marks ≥ 50% ‘C+’ ‘2.5’;
Marks ≥ 45% ‘C’ ‘2.25’; Marks ≥ 40% ‘D’ ‘2.00’; Marks <40% ‘F’ ‘0.00’.
Display the result in the following form:
Roll Name Course Code Credit Obtained Marks Grade Grade Point GPA
----------- ---------------- ---------------- ----------- -------------------- -------- -------------- --------
2022001 Mr. X Math101 4 73 A- 3.50 3.90
Math102 4 85 A+ 4.00
Math109 2 42 A+ 4.00
-- -- -- -- --
-- -- -- -- --
17. Write a Fortran program that uses else-if statements to solve a quadratic equation
ax 2 + bx + c = 0, a 0 . Print the value of the discriminant, the nature of the roots, and the
value of the roots. The following format must be used to print the results:
Rootr1 =********
Rootr2 =********
18. Write a Fortran program to sort a list of numbers in ascending and descending order and hence
print them. Also print the maximum and minimum number.
Page 2 of 2