CSC 105 Programming Principles - I: Mmedvediev@ada - Edu.az
CSC 105 Programming Principles - I: Mmedvediev@ada - Edu.az
PROGRAMMING PRINCIPLES - I
Workload
It is estimated that the students will need to solve up to 10 programming problems per week.
Students will need from 5 to 7 hours per week for assignments.
Reading List
1. Bjarne Stroustrup (2008). Programming. Principles and Practice Using C++, Addison –
Wesley
2. Bjarne Stroustrup (1997). The C++ Programming language, 3rd Ed., Addison – Wesley.
3. Rod Stephens (2013) Essential Algorithms: A Practical approach to Computer Algorithms,
John Wiley & Sons, Inc.
4. Mark Lee (2009). C++ Programming for the absolute Beginner, 2 nd Ed., Course Technology
PTR.
5. Learn C Language. http://www.learncpp.com/
6. C++ Tutorial. http://www.tutorialspoint.com/cplusplus/
Assessment
The bulk of the assessment is weekly programming tasks at www.e-olymp.com online judge
system, which involve solving problems using an efficient algorithm learned in lecture. Students spend
up to 6 hours per week on these assignments and often consult frequently with section instructors for
help. Exercises for assessment are available at e-olymp.com in a separate group only for students and
their tutor. A mid-term exam and a final exam account for a significant portion of the grade.
The overall assessment of students will be divided as follows:
Attendance: 10%
Homework: 15% + 15% = 30%
Midterm: 30%
Final exam: 30%
CodeBlocks Compiler
http://site.ada.edu.az/~medv/CodeBlocks.zip
Online Compiler
http://cpp.sh/
https://ideone.com
Lesson 9. Midterm.
HOMEWORK
www.e-olymp.com
1024,990,5133,4716,4717,7401,7943,7944,1,5175,906,939,943,945,949,519,2860,7491,248,825
4
Lesson 2. September 10 - 16. Conditional statement
Formula
8520. Conditional statement – 1
8521. Conditional statement – 2
8526. Conditional statement – 3
Compare numbers:
8371. Even or Odd
8522. Divisibility
8531. Divisibility by numbers
935. Decomposition of three digit number
6278. City numbers
Minimum and maximum:
2606. Minimum and maximum
3867. Lazy Misha
7812. Maximum among four numbers
Geometry:
774. Cake
905. What type of triangle?
1312. Wardrobe
8372. Create a triangle
Multiple conditions:
206. Tourist
8242. Positive negative or zero
902. The level of educational achievements
903. First or last?
923. Season
1623. Even and odd numbers
Ceiling function:
219. Central heating
1610. Rabbits in the cells
7460. Sightseeing trip
Math problem:
7784. Bars of Gold
8520,8521,8526,8371,8522,8531,935,6278,2606,3867,7812,774,905,1312,8372,206,8242,902,90
3,923,1623,219,1610,7460,7784
5325,1658,8532,2218,273,5328,5713,1118,497,8533,904,7829,921,7841,910,518,927,1265,3002
,6199,7526
8546,8544,1603,2,8243,1605,1609,1606,1607,2607,622,520,8545,4751,2370,4101,2863,388,421
,542
Lesson 5. October 1 - 7. Linear arrays
Elementary
7829. Sum of sequence elements
4730. Fibonacci
7831. Sum without maximal
7832. Number of maximals
Minimum and maximum
914. Maximum of absolute values
917. Twice the minimum
928. The sum of the largest and the smallest
1952. Contr-operation
7834. Two biggest
7849. Change max and min
Two max / min
5059. Two minimums
Arithmetic average
2238. Who will get the "avtomat"?
7368. Arithmetic mean for figure skaters
7833. More than average
Shift the elements
922. Shift the elements to the right
4760. Move zeroes
Reverse of array
1460. Double reverse
2098. Invertor
3935. Reverse
Two loops
8548. Divisible Sum Pairs
Arrays & math
7537. Popular Vote
7829,4730,7831,7832,914,917,928,1952,7834,7849,5059,2238,7368,7833,922,4760,1460,2098,3
935,8548,7537
8569,8319,6827,901,909,8570,8571,7326,8320,8318,8519,1606,2611,87,1427,3255,1608,1611,2
162,8222,8223,8224
8592,2864,2606,920,108,957,8239,8240,8241,4812,1213,2131,934,925,926,2130,1614,141,5083
,419,8255
2,1658,1603,8609, 3258,1601,2999,4751,8524,8525,8530,2666,5123,8377,5282
7829,928,7831,8569,8570,2098,1611,8319,8627
7943,7944,4817,8523,124,925,926,2131,4805,2132,3171