Visva-Bharati · Department of Mathematics
Paper
B.Sc. Mathematics · Semester VI2020
- 1(a) Define algorithm. State four important features of an algorithm. [1+2]
- 1(b) Write an algorithm to calculate and print the value of a function F given by \[F(x)=\begin{cases} x^2+9&x<0\\ x^4+3x^2+7&0\le x<20\\ 12x+7&x\ge20 \end{cases}\] [2]
- 2(a) What do you mean by priority of computation? [3]
- 2(b) (i) Given the values $I=3$, $J=4$, $K=2$, $A=3.0$, $B=4.0$. Find the value of the expression \verb|B + J*K**J/B/I|. \par (ii) If $A=3.0$, $B=2.0$, $C=4.0$, $D=6.0$, $E=5.0$, then find the order of evaluation and the value of the expression \verb|((A+B)*C**1.5-D-E-A)/C+B|. [1+1]
- 3(a) What are the differences between ‘STOP’ statement and ‘END’ statement. [2]
- 3(b) Assuming that $I$ and $J$ are integer variables having the values $-6$ and 9 respectively and that $A$, $B$ and $C$ are real variables with values $-4.23$, 11.2 and 31.2 respectively. Find the value of the following expressions: \begin{small} \begin{verbatim} (i) NINT(C).EQ.(6*I+3) (ii) .NOT.((I.GT.J).OR.(A.LT.C)).EQV.((I.LE.J).AND.(A.GE.C)) (iii) .NOT.((I.GT.J).AND.(A.LT.C)).NEQV.((I.LE.J).OR.(A.GE.C)) \end{verbatim} \end{small} [3]
- 4(a) Describe logical ‘IF’ statement. [2]
- 4(b) Write a complete program to compute and print $K$ where $K=\sum_{I=1}^m\sum_{J=1}^n I*J$ using the logical ‘IF’ statement. [3]
- 5 Describe execution of a ‘DO’ statement. [5]
- 6 Describe unconditional ‘GOTO’ and computed ‘GOTO’ statements. [5]