Questions: 1 978

Answers by our Experts: 1 850

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

Harold and his homework





Harold and Dan are friends and study in the same class. One day, they strike a deal about completing Harold's homework.




The deal is that, for every piece of homework belonging to Harold which Dan completes, Harold will give Dan some money. The catch is that every piece of homework has a deadline associated with it and has to be completed within that deadline only.



It takes 1 unit amount of time to complete a homework. You have to help Dan find and return the maximum money he can earn.



Input Specification:



input1: The number of tasks



input2: An array representing money associated with each task input3: An array representing the deadline of each task



Output Specification:






Your function must return the maximum amount of money Dan can earn





Example 1:






input1: 3






input2: (20,54,41)






input3: (3,4,5)






Output: 115






Explanation:






Here, all the homework can be done as all have different deadlines and so maximum money is the sum of 20+54+41= 115.






Write a menu driven program which has the following options:

1. Factorial of a number

2. Prime or not

3. Odd or Even

4. Exit


Once a menu item is selected the appropriate action should be taken and once this action is finished, the menu should reappear. Unless the user selects the “Exit” option the program should continue to work. You may use of an infinite while and switch statement.


Make a program that prints out the first 8 multiples of a given integer y. Please use for loop.


 Sample output:

Enter a number: 7

7 14 21 28 35 42 49 56 


While purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 1000. If quantity and price per item are input through the keyboard, write a program and a flowchart to calculate the total expenses.



I'm planning to swap the kid's place to another older guy's place so the bully won't be close to the kid. Please help me swap them both.



Instructions:

  1. You are given a main() function that asks the user for two integer inputs and passes these two values to a function call of the swap() function.
  2. The swap function doesn't exist yet so your task is to make its function declaration and implement its function definition.
  3. Its details are the following:
  4. It accepts two integer addresses as its parameters
  5. It will swap the values found in the two integer addresses. For example, if we have two integer values, a = 5 and b = 10, and we pass their addresses to the function call, by the end of the function, the two integer values will be swapped. Meaning, a would now be equal to 10 and b would now be equal to 5.
  6. Do not edit anything in the main() function.

I was supposed to be your tour guide but I don’t know where our destination is. I have a list here that contains all the destinations where we are going to go. Each destination is basically represented with an integer. But it seems that I'm confused.


Please help me by pointing me to the correct address.


Write a C program to calculate the area and perimeter of triangle, square, circle and rectangle


by using the switch case statements.(Uses nested switch case statements).

Point Me There

by CodeChum Admin

I was supposed to be your tour guide but I don’t know where our destination is. I have a list here that contains all the destinations where we are going to go. Each destination is basically represented with an integer. But it seems that I'm confused.


Please help me by pointing me to the correct address.



Instructions:

  1. In the code editor, you are provided with a main() code that asks for an integer input from the user and stores this to the variable n.
  2. Your task is to set the value of the destination_ptr found at line 9 to the address of the variable n.
  3. Aside from this, do not edit anything else.

Write a program to display inverted half pyramid using stars pattern. * * * * * * * * * * * * * * *


Write a program to display half pyramid using stars pattern. * * * * * * * * * * * * * * *


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS