Assignment.docx - Enrollment Number 03-135181-020 Spring 2018 Assignme nt 1 Computer Programming CSC130 Date Department of Computer Sciences Bahria

Assignment.docx - Enrollment Number 03-135181-020 Spring...

This preview shows page 1 - 6 out of 13 pages.

Spring 2018 Enrollment Number: 03-135181-020 Page 0 of 13 Assignme nt 1 Computer Programming CSC130 Department of Computer Sciences, Bahria University Lahore Campus, 47 C Civic Centre, Johar Town Lahore Date: ___________3/25/2018 ________________
Image of page 1
Enrollment Number: 03-135181-020 Contents No table of contents entries found. Page 0 of 13
Image of page 2
Enrollment Number: 03-135181-020 Question no.1: Construct a flow chart in which find the Fibonacci series till term≤555. Page 1 of 13
Image of page 3
Enrollment Number: 03-135181-020 Question no.2 Express an algorithm to get two numbers from the user (dividend and divisor), testing to make sure that the divisor number is not zero, and displaying their quotientusing a flow chart. Flowchart: Page 2 of 13
Image of page 4
Enrollment Number: 03-135181-020 Algorithm: Step 1: start Step 2: Initialize the result, dividend and divisor of float type. Step 3: Input two number from the user of float type that’s dividend and divisor. Step 4: while (divisor = = 0) then print “divisor can’t be zero” and then goes to step 2 otherwise take Next step. Step 5: result=dividend/divisor Step 6: display result. Step 7: End Question no.3 Construct an algorithm and flow chart for the following problem statement. Enter the obtained marks of thirty students in subject s1, s2, s3, s4 and s5. Now find out the average marks of each student as well as find the average marks of the class. Assume that total marks in each subject is hundred, and over all marks in all five subjects are 500.
Image of page 5
Image of page 6

You've reached the end of your free preview.

Want to read all 13 pages?

  • Fall '19

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture