Computer Science, asked by smilekidsai571, 1 month ago

How many times 'hello' will be displayed?
for var=0 to 4 step 1 do
if var==2*var then do
display "hello"
end-if
end-for​

Answers

Answered by ArpitChoubey7274
0

Answer:

this is your answer please mark me brainleast. plz

Attachments:
Answered by vinod04jangid
0

Answer:

Once.

Explanation:

Here the code is:

for var = 0 to 4 THEN

   if var == 2 * var THEN

           display "hello"

   end-if

end-for

This is a FORTRAN code. FORTRAN is a general-purpose, compiled imperative programming language. It is mainly used in the areas such as numerical weather prediction, computational fluid dynamics, geophysics, computational physics and crystallography . It is a popular language for high-performance computing and is used for programs that rank the world's fastest supercomputers.

In this code, since the condition is that var needs to be equal to 2 multiplied by var and that is possible only in the first case when var is equal to 0, when 2*0 will be equal to 0 which will be equal to var.

Hence, hello will be printed once only.

#SPJ3

To know more about FORTRAN, also visit:

https://brainly.in/question/333151?msp_srt_exp=4

https://brainly.in/question/21284621?msp_srt_exp=4

Similar questions