

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This handout is related to Java Network Programming course at Indraprastha Institute of Information Technology. It includes: Fortran, Basics, Microsoft, Developer, Studio, Compile, Execute, Program, Variable, Declaration
Typology: Exercises
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Activity-01 (Execute and Understand )
Program-
This program will greet you if you give it your name:
! My first Fortran program! ! Greetings!
CHARACTER NAME*
WRITE, 'What is your name?' READ, NAME WRITE*, 'Hi there,', NAME END
You should get the following output (your response is in italics):
What is your name?
ABC
Hi there, AB
Activity-
The purpose of this activity is to understand the variable declaration and input/output statements along with simple calculations, write and execute the program and understand its working
Program-
C X= Y= Z=X+Y WRITE(,)X,Y,Z! The expected output is: 10.000 20.0000 30.
END
Program-
Understand the read statementโs operation and try the following modifications
Q.What will happen if in program 3 in line 7 Y is replaced with y?
Activity-
Based on the knowledge learnt in activity-02 write code to evaluate the following numeric expressions, given that A = 2, B = 3, C = 5 (reals); and I = 2, J = 3 (integers). Answers are given in parentheses.
J / (I / J) (division by zero)
Activity-
numbers A and B (supplied from the keyboard). The symbols for subtraction and division are
potential difference. Write a program to compute the energy for some sample values of C and V. Solutions to most exercises are in Appendix E.
2