v>
Write a Java programme named transactions.java that takes input from you in the
form of: positive integers representing the number of items brought in each time,
and negative integers representing the number of items issued out each time.
The programme will then calculate and print out the total number of items
received and issued out, as well as their corresponding total costs. Your
programme ends when the input is zero (0).
v> Write a java programme named AddingNumbers.java that uses a method to sum all
the integers from 10 to 20 but skipping 15 and 16. Invoke the method within the print
command line to print: The sum of all integers from 10 to 20 excluding 15 and 16
is 134.
// Compute the amount in the Piggy Bank
amtInPiggyBank = numPens * 0.01 + numNicks * 0.05 + numDimes * 0.1 + numQuarts * 0.25 + numLoons * 1 + numTwoons * 2;
// Print out the amount in the Piggy Bank
//*** Fix the following statement so it prints a $ and two digits
//*** after the decimal point
Console.WriteLine("{0} has {1} in the Piggy Bank", name, amtInPiggyBank);
Console.ReadLine();
v> Supposing you are operating a warehouse that receives and issues out items daily,
and at the end of each day, you take stock of the transactions. Answer the following
based on your knowledge in Java Programming.
a)
Provide a suitable name for your warehouse.
b)
Suggest the type of item you are dealing with and the cost of each item (e.g.
bags of cement at 50 cedis per bag).
c)
Write a Java programme named transactions.java that takes input from you in the
form of: positive integers representing the number of items brought in each time,
and negative integers representing the number of items issued out each time.
The programme will then calculate and print out the total number of items
received and issued out, as well as their corresponding total costs. Your
programme ends when the input is zero (0).
review this
problem again. You can use print to
debug your code. The printf) may not work in case of syntax/runtime error. The version of GCC being used is 5.5.0 An e-commerce company wishes to buckettze its products. Each product has a product ID The product ID is a numeric number The company has to find the bucket ID from the product ID. The company needs an algorithm which takes the product ID as an input, calculates the smallest and largest permutation with the digits of the product ID, then outputs the sum of these smallest and largest permutations as the bucket ID
Write an algorithm for the company to find the bucket ID for the given product
Input
The input consists of an integer producti representing the product ID of the product.
Output
Print an integer representing the bucket ID for the given product
Example
Half Pyramid - 4
Given an integer N as a starting number and K as input, write a program to print a number pyramid of K rows as shown below.
Input
The first line of input is an integer N.
The second line of input is an integer K.
Explanation
In the example, the given starting number is 10, and the number of rows in the pyramid is 5.
So, the output should be
24
23 22
21 20 19
18 17 16 15
14 13 12 11 10
How to create a program that generates a reverse triangle bearing the numbers of the multiplication table on the user's encoded number. + The user will input any positive whole number that should be greater than 1 and not be greater than 40. If the input is outside the range display "INVALID".
sample input: 5
Sample Output :
1.2.3.4.5
2.4.6.8
3.6.9
4.8
5
Sample Input :10
Sample Output :
01.02.03.04.05.06.07.08.09.10
02.04.06.08.10.12.14.16.18
03.06.09.12.15.18.21.24
04.08.12.16.20.24.28
05.10.15.20.25.30
06.12.18.24.30
07.14.21.28
08.16.24
09.18
10
Supposing you are operating a warehouse that receives and issues out items daily, and at the end of each day, you take stock of the transactions. Answer the following based on your knowledge in Java Programming.
a) Write a Java programme named transactions java that takes input from you in the form of: positive integers representing the number of items brought in each time, and negative integers representing the number of items issued out each time. The programme will then calculate and print out the total number of items received and issued out, as well as their corresponding total costs. Your programme ends when the input is zero (0).