gfortran: declare an array
C#
program arrayProg
real :: numbers(5) !one dimensional real array
integer :: matrix(3,3), i , j !two dimensional integer array
!assigning some values to the array numbers
do i=1,5
numbers(i) = i * 2.0
end do
!display the values
do i = 1, 5
Print *, numbers(i)
end do
!assigning some values to the array matrix
do i=1,3
do j = 1, 3
matrix(i, j) = i+j
end do
end do
!display the values
do i=1,3
do j = 1, 3
write(*,*) matrix(i,j)
end do
end do
!short hand assignment
numbers = (/1.5, 3.2,4.5,0.9,7.2 /)
!display the values
do i = 1, 5
write(*,*) numbers(i)
end do
end program arrayProg
Also in C#:
- Title
- unity get velocity of gameobject
- Category
- C#
- Title
- c# bool list count true
- Category
- C#
- Title
- How to look at an object unity
- Category
- C#
- Title
- unity onclick addlistener
- Category
- C#
- Title
- cannot convert string to generic type c#
- Category
- C#
- Title
- How to get the world position of the edge of an object?
- Category
- C#
- Title
- drag object unity 2d
- Category
- C#
- Title
- disable a component unity
- Category
- C#
- Title
- how to detected WindowCloseEvent in other window wpf
- Category
- C#
- Title
- .sh script: check if file exist
- Category
- C#
- Title
- how to check if textbox is empty in c#
- Category
- C#
- Title
- how to cjeck if a string has a word c#
- Category
- C#
- Title
- docker ssh
- Category
- C#
- Title
- C# previous method
- Category
- C#
- Title
- c#if
- Category
- C#
- Title
- newtonsoft create dynamic object
- Category
- C#
- Title
- how to select time and date in datetimepicker in c#
- Category
- C#
- Title
- c# long to int
- Category
- C#
- Title
- c sharp create dictionary
- Category
- C#
- Title
- validating file upload asp.net core mvc
- Category
- C#
- Title
- c# two dimensional array
- Category
- C#
- Title
- c# inline initialize dictionary
- Category
- C#
- Title
- add new page to site c# programmatically
- Category
- C#
- Title
- c# creating exceptions
- Category
- C#
- Title
- unity change text color
- Category
- C#
- Title
- unity ui not seen
- Category
- C#
- Title
- c# ref
- Category
- C#
- Title
- isdaylightsavingtime in c#
- Category
- C#
- Title
- c# contextswitchdeadlock
- Category
- C#
- Title
- degree between two points latitude longitude c#
- Category
- C#
- Title
- c# keyvaluepair
- Category
- C#
- Title
- c# webrequest cookies
- Category
- C#
- Title
- unity custom editor save changes
- Category
- C#
- Title
- fly cam extended script unity 3d
- Category
- C#
- Title
- c# read all lines from filestream
- Category
- C#
- Title
- how to convert from hexadecimal to binary in c#
- Category
- C#
- Title
- c# loop through two dimensional array
- Category
- C#
- Title
- unity how to change the text on a button
- Category
- C#
- Title
- c# EncoderParameter
- Category
- C#
- Title
- c# webcam
- Category
- C#
- Title
- how to raycast unit
- Category
- C#
- Title
- how to destroy a gameobject after some hits in unity 3d
- Category
- C#
- Title
- unity how to rotate something to point to something else
- Category
- C#
- Title
- The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.
- Category
- C#
- Title
- c# add object to array
- Category
- C#
- Title
- how to print statement in c#
- Category
- C#
- Title
- c# list all files in a directory and subdirectory
- Category
- C#
- Title
- blazor onchange event not firing with inputselect
- Category
- C#
- Title
- C# extend array
- Category
- C#
- Title
- c# mongodb update multiple fields
- Category
- C#
- Title
- c# LCP
- Category
- C#
- Title
- c# properties
- Category
- C#
- Title
- how to make % posibility to spawn an object C# in unity
- Category
- C#
- Title
- how to route back to url using Request.Headers["Referer"].ToString() in asp.net core
- Category
- C#
- Title
- unity serializefield
- Category
- C#
- Title
- initialize matrix c#
- Category
- C#
- Title
- unity detect any key
- Category
- C#
- Title
- parsing object from text file c#
- Category
- C#
- Title
- c# list remove item based on property duplicate
- Category
- C#
- Title
- linq c# object except two lists
- Category
- C#
- Title
- c# expandoobject indexer
- Category
- C#
- Title
- c# one line set
- Category
- C#
- Title
- 2d object look at object
- Category
- C#
- Title
- asp.net c# set session timeout
- Category
- C#
- Title
- C# check many strings quickly
- Category
- C#
- Title
- c# tostring mmm dd yyyy
- Category
- C#
- Title
- dto and automapper
- Category
- C#
- Title
- unity change tag in script
- Category
- C#
- Title
- how to reference function in unity
- Category
- C#
- Title
- web api startup add imemory cache object
- Category
- C#
- Title
- webclient c# example post
- Category
- C#
- Title
- c# format number with leading zeros
- Category
- C#
- Title
- c# read excel file
- Category
- C#
- Title
- unity c# is not equal to
- Category
- C#
- Title
- c# print expression tree
- Category
- C#
- Title
- c# to vb.net
- Category
- C#
- Title
- beard styles without mustache Intitle:work with me
- Category
- C#
- Title
- C# get pc language
- Category
- C#
- Title
- unity set sprite transparency
- Category
- C#
- Title
- or in unity
- Category
- C#
- Title
- c# code snippet template
- Category
- C#
- Title
- c# udpclient receive buffer size
- Category
- C#
- Title
- c# 2 timespan return yesterday
- Category
- C#
- Title
- invalidoperationexception c# ui thread
- Category
- C#
- Title
- c# catch two exceptions in one block
- Category
- C#
- Title
- c# unity rotate first person controller script
- Category
- C#
- Title
- unity cast float to int
- Category
- C#
- Title
- c# check if type implements interface
- Category
- C#
- Title
- c# clone stream
- Category
- C#
- Title
- how to add to a list c#
- Category
- C#
- Title
- unity get scrollbar value
- Category
- C#
- Title
- c# resize bitmap
- Category
- C#
- Title
- c# dictionary literal initializer
- Category
- C#
- Title
- clear combobox c#
- Category
- C#
- Title
- countdown script unity
- Category
- C#
- Title
- how to remove space between string in c#
- Category
- C#
- Title
- list.addrange in c#
- Category
- C#
- Title
- how do loops on C#
- Category
- C#
- Title
- unity detect number key
- Category
- C#
- Title
- convert string array to int C#
- Category
- C#