LA You are given a ID array of integers. Write a program to find the biggest of all the numbers at the Fibonacci sequence locations. Example: If the array is of size 10 and if the elements are (1,4, 45, 2, 92, 108, 116, 7, 6, 9). Then output is 45 108.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
LA You are given a 1D array of integers. Write a program to find the biggest of all the
numbers at the Fibonacci sequence locations.
Example:
If the array is of size 10 and if the elements are (1, 4, 45, 2, 92, 108, 116, 7, 6, 9}. Then
output is 45 108.
1_B You are given a ID array of integers. Write a program to find the biggest of all the
numbers at the prime number locations.
Example:
If the array is of size 10 and if the elements are (1, 4, 45, 2, 92, 108, 116, 7, 6, 9}. Then
output is 108. (M
2_A A space research organization want to transfer a data securely from one planet to
another. But company is concerned about the security of the data. All of their data are
transmitted as four-digit integers. They have asked you to write a program that encrypts
their data so that it can be transmitted more securely. Your program should read a four-
digit integer and encrypt it as follows: Replace each digit by (the sum of that digit plus
7) modulus 10. Then, swap the first digit with the third, swap the second digit with the
fourth and print the encrypted integer. Company ask you to write the code so that after
receiving the data they can convert it into its original value.
2_B Given an integer array of n integers, Write a program to find sum of bit differences in all
pairs that can be formed from array elements. Bit difference of a pair (x, y) is count of
different bits at same positions in binary representations of x and y. For example, bit
difference for 2 and 7 is 2. Binary representation of 2 is 010 and 7 is 111 (first and last
bits differ in two numbers).
Transcribed Image Text:LA You are given a 1D array of integers. Write a program to find the biggest of all the numbers at the Fibonacci sequence locations. Example: If the array is of size 10 and if the elements are (1, 4, 45, 2, 92, 108, 116, 7, 6, 9}. Then output is 45 108. 1_B You are given a ID array of integers. Write a program to find the biggest of all the numbers at the prime number locations. Example: If the array is of size 10 and if the elements are (1, 4, 45, 2, 92, 108, 116, 7, 6, 9}. Then output is 108. (M 2_A A space research organization want to transfer a data securely from one planet to another. But company is concerned about the security of the data. All of their data are transmitted as four-digit integers. They have asked you to write a program that encrypts their data so that it can be transmitted more securely. Your program should read a four- digit integer and encrypt it as follows: Replace each digit by (the sum of that digit plus 7) modulus 10. Then, swap the first digit with the third, swap the second digit with the fourth and print the encrypted integer. Company ask you to write the code so that after receiving the data they can convert it into its original value. 2_B Given an integer array of n integers, Write a program to find sum of bit differences in all pairs that can be formed from array elements. Bit difference of a pair (x, y) is count of different bits at same positions in binary representations of x and y. For example, bit difference for 2 and 7 is 2. Binary representation of 2 is 010 and 7 is 111 (first and last bits differ in two numbers).
Expert Solution
steps

Step by step

Solved in 5 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY