You are on page 1of 2

College of Arts and Sciences

Department of Mathematical and Physical Sciences


Computer Science Section

Assignment No. 1

Course Name: Introduction to Algorithms


Course Code: COMP151
Semester: Fall 2020-2021
Instructor: Dr. Alaa Al-Obaidi

Student Name:
Id Number:

Signature:

Due Date: Wednesday 7/10/2020

Notes:

1- Use handwriting and a pen in answering all the questions on white papers.

2- Write your full name and Id number on the first page. If you have a printer,
print this page only and write all the information.

3- Scan your papers, using a scanner or one of mobile’ scanning applications, in


one pdf file then send the scanned file to: alaamohammed@unizwa.edu.om

4- In the subject part of your email type:

COMP151 Assignment 1 – Full Name – Id Number

Page 1 of 2
Q1- You have three figures: a rectangle, a circle and a square. The length of the
rectangle is 20 cm. The radius of the circle is 12 cm and the area of the square is 16
cm2. You have to calculate and print the total (summation) area of these three
figures.

1- Write an algorithm for the above problem using Pseudocode.


2- Draw a flowchart for the above problem.
3- Write a program in C++ for the above problem by using C++ Shell. Execute the
program, then, by using handwriting, write the program code, in addition to the
inputs and the outputs if you have inputs/outputs.

Page 2 of 2

You might also like