Develop an application in C for following requirement
Big-Bazaar wants an application for Billing.
Biller will enter the following details
Type of customer ( ‘R’ - Regular, ‘S’ - Special),
Product number,
Product cost per unit (greater than 10) and
Quantity purchased.(between 1 and 100)
Application should not accept any wrong entry other than as specified above.
Discount offered by shopping Mall
Gives 10% discount for Special customers.
If total billing amount is more than 1000, additional 5% discount is applied.
Application should apply all possible discount and Display Final Bill amount
All variables must have meaningful names(readable)
Variables should have proper data-types
Define a function named "calAverage" which take a list of integers as parameter. This function
will then calculate and store the average into a variable named "result". Finally, the function
MUST return the result with 2 decimal place only. For Example given the following list,
[2,6,8,3,4,6], the function will return 4.83 (float).
Create a Python script which will accept a positive integer and will determine the input number if PERFECT, ABUNDANT, DEFICIENT.
PERFECT – if the sum of the divisors of the number except the number itself is
equal to the number.
E.g. 6 = 1, 2, 3, 6 1 + 2+ 3 = 6
ABUNDANT – if the sum of the divisors of the number except the number itself
is greater than the number.
E.g. 12 = 1, 2, 3, 4, 6, 12 1 + 2 + 3 + 4 + 6 = 16
DEFICIENT – if the sum of the divisors of the number except the number itself is
less than the number.
E.g. 10 = 1, 2, 5, 10 1 + 2 + 5 = 8
Sample Output:
Input a Positive Integer : 20
20 is ABUNDANT!
I need the code to have an output stated above.
Create a Python script which will accept a positive integer and will determine the input number if PERFECT, ABUNDANT, DEFICIENT.
PERFECT - if the sum of the divisors of the number except the number itself is equal to the number.
E.g. 6= 1, 2, 3, 6 1+2+3=6
ABUNDANT - if the sum of the divisors of the number except the number itself is greater than the number.
E.g. 12= 1, 2, 3, 4, 6, 12 1+2+3+4+6 = 16
DEFICIENT- if the sum of the divisors of the number except the number itself is less than the number.
E.g. 10= 1, 2, 5, 10 1+2+5=8
Sample Output:
Input a Positive Integer : 20
20 is ABUNDANT!
Create a Python script which will accept two positive integers and will display the COMMON DIVISORS.
Sample Output:
Positive Integer 1 : 20
Positive Integer 2: 12
COMMON DIVISORS of 20 and 12 are...
1 2 4
I need the code to have an output stated above.
Write a short comment explaining the code:
function DrawCircle(a, b, r)
%DRAWCIRCLE draws a circle on the coordinate plane
% a and b are the x-axis and y-axis coordinates of the center
% of the circle and r is its radius
t = 0:pi/180:2*pi;
x = r*cos(t) + a;
y = r*sin(t) + b;
plot(x, y, '-', a, b, '.');
axis equal
axis padded
text(a, b,'\leftarrow center')
title("The circle of radius " + string(r));
xlabel("X");
ylabel("Y")
end
Create a Python script which will accept two positive integers and will display the COMMON DIVISORS.
Sample Output:
Positive Integer 1:20 Positive Integer 2: 12
COMMON DIVISORS of 20 and 12 are....
1 2 4
Write a short comment explaining the code:
equipment = ["Power generator", "Transformer", "Stepper motor", "DC motor"];
price = [30, 10, 15, 8.5];
n = 4;
tot_number = 0;
tot_cost = 0;
for i=1:n
number = input("Enter number of " + equipment(i) + ": ");
tot_number = tot_number + number;
tot_cost = tot_cost + number * price(i);
end
avg_cost = tot_cost /tot_number;
fprintf("\n");
fprintf("The total number of equipment: %d\n", tot_number);
fprintf("The total cost: £%.2f\n", tot_cost);
fprintf("The average cost £%.2f per item\n", avg_cost);
Create a Python script which will accept a positive integer and will display the DIVISORS of the input number.
Sample Output:
Input a Positive Integer: 20
The DIVISORS of 20 are...
1 2 4 5 10 20
Create a Python script which will accept a positive integer (n) and any character then it will display the input character n times.
Sample Output:
Positive Integer (n): 7
Input any Character: A
AAAAAAA