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

Create a library management system wherein any library member should be able to search books by their title, author, subject category as well by the publication date.


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.


7. Negative Decimal Tally

by CodeChum Admin

We've been giving positive numbers too much attention lately, it's time to let negative numbers take the spotlight this time!


Instructions:

  1. Input four float numbers; they could be positive or negative.
  2. Only add all inputted negative numbers, and print its sum, up to 2 decimal place.
  3. Hint: The previous/latest topic is about if-else-elseif statements, but do we need one here?

Instructions

  1. Input four decimal numbers, they could be positive or negative.
  2. Add all the negative numbers, and print the sum, up to 2 decimal places.

Input

A line containing four decimals/floats separated by a space.


-30.22·10.5·-2.2·-1.8

Output

A line containing a negative decimal/floats with two decimal places.


-34.22

The Main method is to repeatedly prompt the user to enter a transaction code (char). The codes could be 'B' or 'b' to buy an item using the credit card, 'c' or C' to make a cash withdrawal, 'p' or P for a payment, 'D' or D' to display the balance and 'q' or Q to quit.

There is a void function called CashWithdrawal which accepts one call by value formal parameter of type double (the amount of the cash withdrawal, plus a $3.50 service charge) to add to the credit card balance. If this amount (use a constant) that does not exceed the credit cards credit card limit ($2000), print an error message that the transaction could not be completed.The method header should look like: public static void BuyAnItem(double itemAmt, ref double ccBalance)


8. Sort It Yourself

by CodeChum Admin

A descending order means values arranged from largest to smallest. But in your case, you're going to have to sort these integers in ascending order, which means from smallest to largest.


Instructions:

  1. Input three integers.
  2. Print the integers in ascending order using your knowledge on conditional statements.

Instructions

  1. Input three integers.
  2. Print the integers in ascending order.

Input

A line containing three integers separated by a space.


6·1·3

Output

A line containing three integers separated by a space.


1·3·6

7. Negative Decimal Tally

by CodeChum Admin

We've been giving positive numbers too much attention lately, it's time to let negative numbers take the spotlight this time!


Instructions:

  1. Input four float numbers; they could be positive or negative.
  2. Only add all inputted negative numbers, and print its sum, up to 2 decimal place.
  3. Hint: The previous/latest topic is about if-else-elseif statements, but do we need one here?

Instructions

  1. Input four decimal numbers, they could be positive or negative.
  2. Add all the negative numbers, and print the sum, up to 2 decimal places.

Input

A line containing four decimals/floats separated by a space.


-30.22·10.5·-2.2·-1.8

Output

A line containing a negative decimal/floats with two decimal places.


-34.22

6. Largest Digit

by CodeChum Admin

This one is a bit tricky. You're going to have to isolate each digit of the integer to determine which one is the largest, so good luck!


Instructions:

  1. Input a 3-digit integer.
  2. Print the largest digit in the integer.
  3. Tip #1: Use % 10 to get the rightmost digit. For example, if you do 412 % 10, then the result would be the rightmost digit, which is 2.
  4. Tip #2: On the other hand, use / 10 to remove the rightmost digit. For example, if you do 412 / 10, then the result would be 41.
  5. Tip #3: You'd have to repeat Tip #1 and Tip #2 three times for this problem because the input is a 3-digit integer.

Instructions

  1. Input one 3-digit integer.
  2. Print the largest digit in the integer. (Hint: use % 10 to get the rightmost digit and / 10 to remove it)

Input

A line containing a three-digit integer.


173

Output

A line containing a single-digit integer


7

5. Operation: Operation

by CodeChum Admin

You have been cordially invited to partake in Operation: Operation. Your mission, should you choose to accept it, is to take the two numbers and the operator given then perform the operation successfully.


Instructions:

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number (integer or decimal).
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Instructions

  1. Input one number (integer or decimal), an operator (+, -, *, /), and another number.
  2. Print the result of the operation between the two numbers, up to 2 decimal places.

Input

The first line contains the first number.

The second line contains the operator.

The third line contains the second number.

5
+
0.70

Output

A line containing a decimal/float containing two decimal places.


5.70

4. Length Comparison Redux

by CodeChum Admin

The first time around we did this was a bit simple. Let's kick it up a notch don't you think?


Instructions:

  1. Input two strings in different lines.
  2. If the 1st string is longer than the 2nd string, print "First". If the 2nd string is longer than the 1st string, print "Second". But if both strings have the same length, print "Equal".

Instructions

  1. Input two strings in different lines.
  2. If the 1st string is longer than the 2nd string, print "First". If the 2nd string is longer than the 1st string, print "Second". But if both strings have the same length, print "Equal".

Input

Two lines containing a string on each.


VeryLongText
ShortText

Output

A line containing a string.


First

Use C# to help manage your credit card debt. The Main method is to repeatedly prompt the user to enter a transaction code (char) which could be 'B' or 'b' to buy an item using the credit card, 'c' or c' to make a cash withdrawal, 'd' or d' to display the balance, and 'q' or Q' to quit. A void method called Buy An Item first applies the HST (13%) to the amount of the item and then determines if there is enough credit remaining on the card to allow the purchase to complete. If not, it will print an error message indicating that the purchase could not complete.

You can assume that the initial balance on the credit card is $0.00.Using a switch statement in the do-while loop on Main, select the appropriate action and call (invoke) the appropriate user-defined method. The Main method should continue accepting transactions until the user enters a ‘Q’ or ‘q’. 


LATEST TUTORIALS
APPROVED BY CLIENTS