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:
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).
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:
Write a program to display inverted half pyramid using stars pattern. * * * * * * * * * * * * * * *
Write a program to display half pyramid using stars pattern. * * * * * * * * * * * * * * *