Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

King Fahd University of Petroleum & Minerals College of Computer Seicnees and Engineering Information and Computer Science Department ICS 108: Object Oriented Programming (3-3-4) Assignment

image text in transcribed
image text in transcribed
image text in transcribed
King Fahd University of Petroleum \& Minerals College of Computer Seicnees and Engineering Information and Computer Science Department ICS 108: Object Oriented Programming (3-3-4) Assignment 2 - Spring Semester 222 Deadlise: Tuculay, February 11,2023 Instructions: - Please submit only one juva file. - DO NOT compress your file. Late submission policy: Sabmissions reccived within 24 hours affer the deadline will be graded out of 605 of the overall grade. No submissions will be aceepted after 24 hours of the original deadline. Problem 1 ( 50 points) The game starts with a lis of nandom positive integer numbers such that their sum 45. In each roand, you subernct one from each number in the list and renove it if it becomes zero. add the sum of the subencted numbers to the end of the lise. The game is over when the list has 1, 2,3,4, 5, 6,7,8, and 9 , in some order. In your program, print the list after each round. Here is a sample run of the program: [18,10,7,2,4,4] [17,9,6,1,3,3,6] [16,8,5,2,2,5,7] [15,7,4,1,1,4,6,7] [14,6,3,3,5,6,8] [13,5,2,2,4,5,7,7] [12,4,1,1,3,4,6,6,8] [11,3,2,3,5,5,7,9] [10,2,1,2,4,4,6,8,8] [9,1,1,3,3,5,7,7,9] [8,2,2,4,6,6,8,9] [7,1,1,3,5,5,7,8,8] [6,2,4,4,6,7,7,9] [5,1,3,3,5,6,6,8,8] [4,2,2,4,5,5,7,7,9] [3,1,1,3,4,4,6,6,0] Here is a sample run of the program: (b) Use the intepraton capubitities of a gy. acprowimate the area. (c) Find the euct arci anolythally

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago