The system should allow the customer to check the price of the item(s)(list box or not) and select the items they want to buy. perform the transaction and the system should allow the end-user to enter the amount they are paying for the item(s) and get their change back.
Produce a receipt of the total cost of items and change given. There are 10 items to choose from.
The receipt also shows the VAT(15%)
10% is given to loyal customers as a discount.so it is the total amount of items that get the 10% off and the VAT for all the items. please help us with this because we have been trying different ways for the last few days.
Given an M x N matrix find all anti-diagonal elements of the matrix..
input :
the first input will contain values of M, N with separated by spaces..
the second line will contain matrix with M x N dimensions
i.e. input is
4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
output:
1
2 5
3 6 9
4 7 10 13
8 11 14
12 15
16
Write a recursive function power (x, y) that calculates the value of x to the power.
double radius;
double height;
double ans;
Console.WriteLine("what is the radius ");
radius = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("what is the height ");
height = Convert.ToDouble(Console.ReadLine());
ans = radius * radius * 3.14 * height ;
Console.WriteLine("your volume is " + ans );
}
}
Let b is a real number. Let n be a non-negative integer. Assume
b and n are not simultaneously 0. Write iterative and recursive functions that return value of bn , the nth power of b.
follow the following methods’ details :
powerRecursive()
• Return the computed nth power of b
powerIteration()
• Receive the values of b and n from main() and compute the nth power of b iteratively
• Return the computed nth power of b
main()
Sample Output:
Enter value of b:3
Enter value of n: 6
6th power of 3 is 729. --> This is displayed through Iterative Method.
6th power of 3 is 729. --> This is displayed through Recursive Method.
Program
Create a program that decodes a numeric message and prints out its "product" sequence
Input
The user will input ten (10) consecutive whole numbers
Output
The program will only process the output if all 10 numbers are encoded. There will be 2 main display of the program. The first one will be the decoded message and the other is the product sequence.
Decoded Message. The 10 numbers will then be decoded according to character equivalent in the English alphabet. Ex
1 = a
2 = b
26 = z
However, this doesn't mean that the program will only evaluate from 1 to 26.
26 = z
52 = z
104 = z
Product Sequence. The second output or sequence of output is the equivalent multiplication table according to the encoded number.
4:4-8-12-16
3:3-6-9
Input #1
0
1
0
1
0
1
0
1
Output #1
a a a a
0:
1:1
0:
1:1
0:
1:1
0:
1:1#2
8
5
12
15
18#2
helloworld
8:8-16-24-32-40-48-56-64
5:5-10-15-20-25
12:12-24-36-48-60-72-84-96-108-120-132-144
15:15-30-45-60-75-90-105-120-135-150-165-180-195-210-225
18:18-36-54-72-90-108-126-144-162-180-198-216-234-252-270-288-306-324Using a whole loop create a that calculates the monthly salaryof N [ where N is the number if employees that's entered by the user.] If the employee worked less or equal to 160 hours, the employee wilk be paid N$240.00 per hour. For any hour greater than 160, the employee is paid N$320.00 per hour.
// Method: CalculateNet
// Parameters
// grossP: double storing the grossPay
// tax: double storing tax percentage to be removed from gross pay
// netP: call by reference double storing the computed net pay
// Returns: void
public static void CalculateNet(double grossP, double tax, ref double netP)
{
// *** Insert the details of the CalculateNet Method
}Question is to Insert the details of the CalculateNet Method
// Call a method to calculate the gross pay (call by value)
grossPay = CalculateGross(hrsWrked, ratePay);
// Invoke a method to calculate the net pay (call by reference)
CalculateNet(grossPay, taxRate , ref netPay);
// print out the results
Console.WriteLine("{0} worked {1} hours at {2:C} per hour", lastName,
hrsWrked, ratePay);
// *** Insert the code to print out the Gross Pay and Net Pay
Console.ReadLine();
}
// Method: CalculateGross
// Parameters
// hours: integer storing the number of hours of work
// rate: double storing the hourly rate
// Returns: double storing the computed gross pay
public static double CalculateGross(int hours, double rate)
{
// *** Insert the contents of the CalculateGross Method
}1.Question is to insert the code to print out the Gross Pay and Net Pay.
2.Insert the contents of CalculateGross Method.
Write a program to implement a dequeue with the help of a linked list.