[go: up one dir, main page]

0% found this document useful (0 votes)
20 views2 pages

Final Exam - 2nd Attempt

The document outlines an exam for a Petroleum Engineering computer programming course. It contains 5 questions testing skills like using loops to generate numbers, finding sums with Do loops, calculating series terms with inputs, sorting and reversing arrays, and working with 2D arrays.

Uploaded by

fewfwefwe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views2 pages

Final Exam - 2nd Attempt

The document outlines an exam for a Petroleum Engineering computer programming course. It contains 5 questions testing skills like using loops to generate numbers, finding sums with Do loops, calculating series terms with inputs, sorting and reversing arrays, and working with 2D arrays.

Uploaded by

fewfwefwe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Basra University– College of Engineering

Petroleum Engineering Department

Subject: Computer Programming I Exam: Final - 2nd attempt


Class: 1st year Date: 14/9/2021
Examiner: Assist. Lect. Haider S. Mohammed Time: 3 Hours
Note: Attempt all questions
Q1] Write a program to generate the numbers following
(1, 100, 1000, 10000, 100000, 1000000, 10000000) on ListBox, by using For
Next Loop.
(11 Marks)

Q2] Design a form and write code to find the summation of odd numbers (from
10 to 30), using Do Loop.

(11 Marks)

Q3] Create a Visual Basic Project to find the value of the following series.
𝑥2 𝑥4 𝑥6 𝑥8
Cos(𝑥) = 1 − + − + −⋯
2! 4! 6! 8!
Write the code program so that the value of angle (𝑥) is entered into TextBox and
the number of terms (N) is entered into input box. Calculate the value of series and
display the result of series (Cos(𝑥)) in another separate Textbox.

(11 Marks)
(1-2)
Q4] Create an array holding 12 integer numbers, and try to sort the array then
reverse it.
(11 Marks)

Q5] Write a code program to read a two-dimensional array (A), and assign values to
an array (A) by using the counter. Also, print the largest value and its location
in Textboxes as shown in the below Figure.

(11 Marks)

Examiner Head of the Department


Assist. Lect. Haider Sami Mohammed Dr. Hussein Sadiq Sultan

(2-2)

You might also like