loading...

# CS101 Assignment No. 3 Spring 2012 solution

Question No. 1 :        [ 5 * 2 = 10 marks]

Suppose following is a work sheet of MS Excel.

Apply the appropriate formulas in MS Excel using the same data given in above diagram, to find the result (same as shown in the diagram) of the below mentioned requirements and just write down the formulas in the solution file ( MS word file).

1. Sum of Marks of all subjects
2. Average of all Marks
3. Highest Marks attained
4. Total number of subjects having Grade A
5. Sum of Marks of those subjects having Grade B

Sum of Marks of all subjects:

=SUM(B6:B15)

Average of all Marks:

=AVERAGE(B6:B15)

Highest Marks Attained:

=MAX(B6:B15)

Total number of subjects having Grade A:

=COUNTIF(C6:C15,”a”)

Sum of Marks of those subjects having Grade B:

=SUMIF(C6:C15,”b”,B6:B15)

Question No.02: –

Write JavaScript code using “For loop” to display all the odd numbers between 1 and 100 (both inclusive). Each number should be displayed on a separate line as follows:

For loop: –

`<Html>`
`<head>`
`<title> For loop </title>`
`</head>`
`<body>`
`<script>`
`for(i=1;i<=99;i=i+2) {`
`   document.write(i+"<br>");`
`}`
`</script>`
`</body>`
`</html>`
DOWNLOAD SOLUTION HERE
loading...