Visva-Bharati · Department of Mathematics
DSEMA-3A
B.Sc. Mathematics · Semester VI2021
- 1(a) What do you mean by machine level language? How does they differ from assembly level language? [1+1]
- 1(b) Draw a flowchart to find out whether a given year is a leap year or not. [3]
- 2(a) Write down the FORTRAN expression of the following mathematical expression: \[\sqrt{|\sin(a-|b|)|}+\log_{10}(a-b)^2+\frac{\tanh 3x}{1+x^{-\frac29}}\] [2]
- 2(b) Using the statement function defined by $\mathrm{DVD}(X,Y)=\frac{X-Y}{X+Y}$, write assign statements to evaluate \[\alpha=\frac{\sqrt p+5}{\sqrt p-5},\quad \beta=\left[\frac{(a+b)^2+(c+d)^2}{(a+b)^2-(c+d)^2}\right]^{\frac32},\quad \gamma=3\log_{10}\left|\frac{1+r}{1-r}\right|^{\frac12}.\] [3]
- 3(a) Write a FORTRAN 77 program to compute the Euclidean norm of a given real $10\times10$ matrix $M=(m_{ij})$, where the norm is defined by $EN=\left(\sum_{i=1}^{10}\sum_{j=1}^{10}m_{ij}^2\right)^{\frac12}$. [3]
- 3(b) Describe the output if the following is executed: \begin{verbatim} WRITE(6, 20) (A(J, K), J= 2, 8, 3), K=1, 4) 20 FORMAT(1X, 5(3X, F10.2)) \end{verbatim} [2]
- 4(a) Translate the following flowchart to equivalent FORTRAN 77 program. \begin{center} \includegraphics[width=.57\linewidth]{BSc_VI_2021_DSEMA3A_Q4a.png} \end{center} [3]
- 4(b) State (with examples) two important differences between ARITHMETIC IF statement and LOGICAL IF statement. [2]
- 5(a) Find errors if any, in each of the following FORTRAN 77 segments. \begin{verbatim} (i) DO 400 K=4, 2*M, 3 (ii) WRITE(6,40) (A(L, K+3), K=1, 7), L=1, 5) \end{verbatim} [1+1]
- 5(b) If P=2.0, Q=3.0, R=4.0, S=5.0, T=6.0, then find the order of the evaluation and value of the expression \verb|((P+Q)*R**1.5-S-T+P)/Q+R|. [3]
- 6(a) Find the label of the statement to which control is transferred for each of the following FORTRAN 77 segments. \begin{verbatim} (i) I=2 NEXT=4-I GO TO(21, 31, 41, 51), NEXT (ii) INTEGER TYPE K=3 TYPE=2+K GO TO(50, 60, 70, 80), TYPE \end{verbatim} [1+1]
- 6(b) What will be the final values of the variables in the following FORTRAN 77 program after all the statements have been executed? You must mention all the necessary steps involved to evaluate the variables. \begin{verbatim} P=5 I=1 ASSIGN 55 TO K 55 GO TO(35, 35, 45, 25), I 25 ASSIGN 65 TO K 35 P=P+2 45 I=I+1 GO TO K, (55, 65) 65 P=P-1 Q=P+I \end{verbatim} [3]