Lab 6 – 2017

Slides: [ EST ] [ ENG ]

Homework: Task 1 and Task 2 implementation in Python (1+1 p)

Task 1

Write an algorithm which will have the following requirements:

  1. Array A[n][m] will be read from keyboard, maxn=10, maxm=10
  2. Find a sum of negative elements for every row below row 7 in array A (one sum per every row) and output them on the screen

Task 2

Write an algorithm, which will have the following requirements:

  1. Enter the real numerical S, amount of money and Bij (banknotes nominal value and number of them);
  2. S is rounded to integer
  3. For payment S must use the minimum number of banknotes(Bij), output result on the screen.

Example: S = 40 Bij => (5 10; 10 2; 20 4; 50 5);

Result 1 => 10 2; 20 1; total banknotes number: 3;(Not minimal)
Result 2 => 20 2; total banknotes number 2;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.