Skip to content
Visva-Bharati · Department of Mathematics

DSEMA-3A

B.Sc. Mathematics · Semester VI2025
  1. 1(a) Write an algorithm that reads five hundred (500) integers and write their sum of squares. [2]
  2. 1(b) Given the following declaration \begin{verbatim} CHARACTER*30 SNAME*10, NAME*10, ADDRESS, CITY*5, MOBNUMBER*11 \end{verbatim} how many character spaces are given to each of the declared variable? [1]
  3. 1(c) Considering the following declarations \begin{verbatim} CHARACTER*6 NAME1='John', NAME2='Sammy' CHARACTER*7 NAME3='RITA', NAME4='MICHAEL' \end{verbatim} What is the result of following concatenation? \begin{verbatim} (i) NAME2//NAME3 (ii) NAME4//NAME3 (iii) NAME1//NAME4 (iv) NAME2//NAME4 \end{verbatim} [1]
  4. 1(d) Given a string \verb|A='12345678'|. Find (i) \verb|A(:5)| (ii) \verb|A(3+x:)|, if $x=2$ (iii) \verb|A(2:8)|. [1]
  5. 2(a) Draw a flow chart to reverse the digits of a three digit number. [2]
  6. 2(b) In the below program, find errors, if any, and then write the correct program. \begin{verbatim} PROGRAM BUG REAL a,b,c a=b+c READ(*,*) c WRITE(*,*) a END PROGRAM SIMPLE \end{verbatim} [1]
  7. 2(c) Evaluate the following arithmetic expressions \begin{verbatim} (i) 3**2 + 4/5 (ii) 3 + 2.**3 (iii) (3+2**3)/5 (iv) 3**2**3 \end{verbatim} [1]
  8. 2(d) If A = 1.0, B = 2.5 and C = 6.5 find the value of the following logical expressions showing the order of evaluation. \begin{verbatim} (i) A.GT.B.AND.A*B.LE.C (ii) A.GT.B.OR.A*B.LE.C (iii) NOT.A.GT.B.AND.A*B.LE.C (iv) A.GT.B.AND.(A.LE.C.OR.B.NE.C).OR.NOT.(A.EQ.B) \end{verbatim} [1]
  9. 3(a) Draw a flowchart to find the summation $x-x^3/3!+x^5/5!-\ldots+(-1)^nx^{(2n+1)}/(2n+1)!$ for given values of x and n. [2]
  10. 3(b) Assuming the declaration \begin{verbatim} INTEGER MAT(3,3), NUM(6), I, J \end{verbatim} and the data line \begin{verbatim} 1, 2, 3, 4, 5, 6, 7, 8, 9 \end{verbatim} find the value assigned to each array element in the following program segments: \begin{verbatim} (i) DO 20 I=1,3 DO 20 J=1,3 IF (I.LT.J) THEN MAT(I,J) = -1 ELSEIF(I.EQ.J) THEN MAT(I,J) = 0 ELSE MAT(I,J) = 1 ENDIF 20 CONTINUE (ii) DO 20 I=1,3 DO 30 J=1,3 30 MAT(I,J)=0 DO 10 J=I+1,J MAT(I,J)=2 10 CONTINUE 20 CONTINUE (iii) READ(*,*) (NUM(k),k=1,6) DO 20 I=1,3 DO 20 J=1,3 MAT(I,J) = NUM(I) + NUM(J) 20 CONTINUE (iv) READ(*,*) (NUM(N),N=1,6), (MAT(1,J),J=1,3) DO 20 I=1,2 DO 20 J=1,3 MAT(NUM(I+1),NUM(J))=NUM(I+J) 20 CONTINUE \end{verbatim}
  11. 4(a) The marks distribution of a course is: Attendance - 10\%, Class Tests - 20\%, Midterm Exam - 20\% and Final Exam - 50\%. The grades given are: $A$ for $\geq90\%$, $B$ for $\geq80\%$ and $<90\%$, $C$ for $\geq70\%$ and $<80\%$, $D$ for $\geq60\%$ and $<70\%$, $F$ for $<60\%$. If the teacher takes 40 classes and if Class Tests, Midterm and Final Exam have full marks of 100 each, write a FORTRAN program to calculate a student's grade. [3]
  12. 4(b) Write down the FORTRAN expression of the following mathematical expressions: \[ \text{(i) }\cos\left(\frac{(a^5+5|d|+\log_{10}|d|)}{\cot(b^{-2}-c^{-3})\operatorname{cosec}^{-1}(x)}\right) \qquad \text{(ii) }\cot^{-1}\left(\frac1{\sqrt{2k}}\right)e^{-\frac{(x-c)^2}{2k^2}} \qquad \text{(iii) }\frac{ab^c+bc^a}{c+\frac{d}{|a+ib|}}. \]
  13. 5 Describe the execution of a DO statement. Elaborate the execution using flow chart. [3+2]
  14. 6(a) The horizontal ($x$) and vertical ($y$) distances traveled by a cricket ball are given by \begin{align} x&=ut\cos\alpha\\ y&=ut\sin\alpha-\frac{gt^2}{2}. \end{align} Write a FORTRAN program to do the following, \begin{romanparts} \item Read $u,\alpha,g$ and $x$. \item Calculate $t$ from equation (1), $y$ from equation (2) and write $t$ and $y$ to the screen. \item Write \textquoteleft Big Six\textquoteright{} if $y\geq8$, \textquoteleft Maybe Six\textquoteright{} if $0\leq y\leq8$, \textquoteleft Not Six\textquoteright{} otherwise. \end{romanparts} [3]
  15. 6(b) Write two differences between STOP and END statements. [1]
  16. 6(c) Define a statement function to calculate $R=\sqrt{u^2+v^2+w^2}$ and write assignment statements to calculate $A=\dfrac{x}{\sqrt{x^2+y^2+z^2}}$, $B=\sqrt{x^4+y^4+z^4}$, $C=\sqrt{4x^2+9y^2+4z^2}$ using that statement function. [1]