在Visual FORTRAN 6.6上,编程实现如下的图形: * *** ***** *******
时间: 2023-10-07 14:06:47 浏览: 82
在Visual FORTRAN 6.6上,实现上述图形的编程如下:
```fortran
program triangle
implicit none
integer :: i, j, k
do i = 1, 4
do j = 1, 2*i-1
write(*, *) "*"
end do
write(*, *)
end do
end program triangle
```
相关问题
在Visual FORTRAN 6.6上,编程实现如下的图形: * *** ***** *******
是的,我可以帮你编写一个在 Visual FORTRAN 6.6 上实现该图形的程序。请参考以下代码:
```fortran
program draw_pattern
implicit none
integer :: i, j, k, n
n = 4
do i = 1, n
do j = 1, n - i
write(*, '(A1)', advance='no') ' '
end do
do k = 1, 2*i-1
write(*, '(A1)', advance='no') '*'
end do
write(*, *)
end do
end program draw_pattern
```
编译并运行上述代码,将输出所需的图形:
```
*
***
*****
*******
```
在Visual FORTRAN 6.6上,编程实现如下的图形: * *** ***** *******
您可以使用以下代码在Visual FORTRAN 6.6上实现所述图形:
```fortran
program triangle
integer :: i, j, n
n = 4
do i = 0, n
do j = 1, 2*i+1
print *, "*"
end do
print *
end do
end program triangle
```
阅读全文