Questions: 1 680

Answers by our Experts: 1 680

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

You’re tasked with pairing up people with each other but you need to figure out how well both of them work together. In order to find out how effective each pair is, you need to create a program that adds both of their values and returns their sum.


Write a program/method to swap two neighboring numbers in an array when the first index is given



The first three lines will contain message prompts to input the three decimal numbers.

The last line contains the result in two decimal places.


a. Partially True

b. Absolute True

c. Partially False

d. Obviously False

Choose the appropriate one from the options above.


1. bool arr[ ] ={false, ture, 0}; is a calid array declaration and initialization.


2. float arr[6] = {43, 23.23 ,423 ,123.43 ,876,23}; is a valid array declaration and initialization.


3. int arr[55] = {1, 2, 3, 4123.34, 123.43, 876, 23}; is a valid array declaration and initialization.


4. int arr[2] = {1, 2, 3, 4123.34, 123.43, 876, 23}; is a valid array declaration and initialization.


5. float arr[20] = {43, 23.23 ,423 ,123.43 ,876, 23}; is a valid array declaration and initialization.


6. bool truth_table[ ] ={true}; is a valid array declaration and initialization.


7. int arr[ ] = {1, 2, 3, 4123.34, 123.43, 876, 23}; is a valid array declaration and initialization.


8.what is the output if the user input are the numbers 12, 23, 34, 45, 56, 67, 78, 89, 90, 101?



Your task is to develop a circular linked-list based simulation of the Josephus problem. The


simulation will be text based. The user should be presented with a text-based menu asking him to


enter the total number of people (n), starting point (i), direction (clockwise/anti-clockwise) and


number to be skipped (k).


Let’s take an example.


• For n =15 (i.e. number of people is 15)


• k = 2 (i.e. every 2nd person is killed)


• starting point (i) = 1


• direction = clockwise


Initial scenario: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


After 1


st iteration: 1 3 5 7 9 11 13 15


After 2


nd iteration: 3 7 11 15


After 3rd iteration: 7 15


After 4th iteration: 15 (15 remains in the end). Program stops here.

  • Write a program that prompts the user to input: 4 quizzes, 4 laboratory exercises and 4 assignments in percentage for Class Participation.
  • The program should output the average of quizzes, laboratory exercises and assignments and compute the equivalent percentage by getting the 40%.
  • The user will input the major examination and get the equivalent by getting the 60% of it.
  • The program should output the Prelim Grade:
  • Prelim Grade = class participation + major examination
  • Remarks: if the grade is greater than or equal to 75 display PASSED, otherwise FAILED

SAMPLE RUN:

Class Participation

               Quiz 1: 90

               Quiz 2: 95

               Quiz 3: 89

Quiz 4: 80

                               Average: 88.5

               Lab. 1:  100

               Lab. 2:  95

               Lab. 3: 80

Lab 4: 70

                               Average: 86.25

               Assignment 1:  100

               Assignment 2:  80

               Assignment 3:  89

Assignment 4: 75

                               Average: 86

                Class Participation: 34.73

Prelim Exam: 95

              %: 57.00

Prelim Grade: 91.73

Remarks: PASSED


Test that array with both selection sort and bubble sort.Compute the time taken for each algorithm to complete.Repeat step two and three for 1000, 10000, 100000, and 1000000 random numbers.Plot the results in a graph


Write a program/method to compare two neighboring numbers in an array when the first index is given.Now combine the above two methods and implement bubble sort algorithm. You must call the above two methods in your sorting program.Now test your sorting program with a random number array generator you created 2


Test that array with both selection sort and bubble sort.Compute the time taken for each algorithm to complete.Repeat step two and three for 1000, 10000, 100000, and 1000000 random numbers.Plot the results in a graph


Write a program that will input student’s information (i.e. name, id, cgpa) who have enrolled

for CSE-207 course in Summer 2020. You have to declare a pointer variable to input the

information and dynamically allocate memory for storing information of each student. After

taking input find out the student name who has obtained the highest GPA.


LATEST TUTORIALS
APPROVED BY CLIENTS