Sort all the stacks in this order: Stack1 in alphabetic order by name Stack2 in alphabetic order by Surname Stack3 in Numeric order (descending) by marks obtained
Sometimes we want some part of our code to be executed more than once. We can repeat the code in our program. For example, we need to display our name for a hundred or more times it is not practical to write the same code. Which concept will be used? Explain it with the help of suitable example
[5 marks]
WAP to calculate the gross salary for the conditions given below. Basic salary is inputted
from the user.
3.It has been suggested that one of the problems of having a user closely involved with a software development team is that they “go native”. That is, they adopt the outlook of the development team and lose sight of the needs of their user colleagues. Suggest three ways how you might avoid this problem and discuss the advantages and disadvantages of each approach.
Write a program to help them understand the American temperature readings easier, based on their indian way of understandings
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).
Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color's value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).
Given values for red, green, and blue, remove the gray part.
Armstrong numbers between two intervals
Write a program to print all the Armstrong numbers in the given range
The first line has an integer
Print all Armstrong numbers separated by a space.
If there are no Armstrong numbers in the given range, print
For
A = 150 and B = 200For example, if we take number 153, the sum of the cube of digits
1, 5, 3 is 13 + 53 + 33 = 153.
So, the output should be
153.
Sample Input 1
150
200
Sample Output 1
153
Sample Input 2
1
3
Sample Output 2
1 2 3
6 / 8 Test Cases Passed
*When you submit the code, we will run it against a set of exhaustive test cases.
Input
1
2
10
15
Your Output
Expected
-1Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x +
The first line contains a single integer N.
Next N lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes coefficient of Pi.Output
For term Cix^Pi, if the coefficient of the term Ci is 1, print x^Pi instead of 1x^Pi.Explanation
N <= 100
0 <= Pi < 1000
-1000 <= Ci <= 1000
Sample Input
4
0 5
1 0
2 10
3 6
Sample Output
6x^3 + 10x^2 + 5
Failed Testcases:
Your Output7x^4 + 6x^3 + 1x^2 + 3 + 2Expected
7x^4 + 6x^3 + x^2 + 3x + 2