Baklava in Fortran

Published on 15 October 2025 (Updated: 15 October 2025)

Welcome to the Baklava in Fortran page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

program baklava
   implicit none
   integer :: i, size, spaces, stars

   parameter (size = 10)

   do i = 0, size
      spaces = size - i
      stars  = i * 2 + 1
      print '(A)', repeat(' ', spaces)//repeat('*', stars)
   end do

   do i = size-1, 0, -1
      spaces = size - i
      stars  = i * 2 + 1
      print '(A)', repeat(' ', spaces)//repeat('*', stars)
   end do
end program baklava

Baklava in Fortran was written by:

If you see anything you'd like to change or update, please consider contributing.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.