logo

Crowdly

برمجة الحاسوب (2) الشعبة 7 عملي

Looking for برمجة الحاسوب (2) الشعبة 7 عملي test answers and solutions? Browse our comprehensive collection of verified answers for برمجة الحاسوب (2) الشعبة 7 عملي at lms.ptuk.edu.ps.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Implement the two following methods:

/*Rotate the array Kth times to

the 

left then return it

public static int[] rotate (int[] a,

int k) 

 

/* prints the array elements on the

screen 

public static void

printArray(int[] arr) 

 

Write a program that creates and fills an integer array with the digits of your registration number. 

Then prompt the user to enter an integer value for K as the desired rotation steps,

Then use the two methods to rotate and to print the array after rotating.

 

Sample1:

Input:

1 2 3 4 5 6 7 8 9 10

1

Output:

 2 3 4 5 6 7 8 9 10 1

 

Sample2:

Input:

1 2 3 4 5 6 7 8 9 10

3

Output:

4 5 6 7 8 9 10 1 2 3 

 

View this question

 ملاحظات مهمة : 

1- ترجمة نص السؤال عندك مسموحة، اذا كان هذا يساعدك في فهمه

2- ارفع الكود كملف امتداده جافا

3- وارفع صورة التنفيذ

View this question

Want instant access to all verified answers on lms.ptuk.edu.ps?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!