Smaller Scores
A group of people(P) are playing an online game. Their scores are stored in the order of their entry time in S. Each integer S[i] corresponds to the score of the person Pi.
For each person Pi you have to report the number of people who played after the person and scored less than the person.
Input
The first line contains a single integer N.
The second line contains N space-separated
Output
The output should contain N space-separated integers representing the number of people who played after the person and scored less than the person.
Explanation
Given S = 13 12 11 Score of P1 is 13. Score of P2 is 12. Score of P3 is 11.The number of people who played after P1 and scored less than 13 is 2(12, 11). The number of people who played after P2 and scored less than 12 is 1(11). The number of people who played after P3 and scored less than 11 is 0.The output is 2 1 0.
Sample Input 1
3
13 12 11
Sample Output 1
2 1 0
Sample Input 2
4
4 3 5 2
Sample Output 2
2 1 1 0
Every DNA sequence consists of four nucleotides: Adenine, Thymine, Cytosine, and Guanine,
referred to by the first letters of their chemical names (A, T, C, and G). I have provided an
entire DNA sequence in the file dnaSequence.txt.
You goal is to provide a report of the number of each nucleotide within the sequence, and the
percent each nucleotide makes up of the total. You should include your output file in the
submission in addition to our usual submission format (console output + code).
Example Output:
DNA sequence analysis:
29782 nucleotides in the sequence
Sequence breakdown:
Adenine: 8892 29.86%
Thymine: 9581 32.17%
Cytosine: 5462 18.34%
Guanine: 5847 19.63%
Computers process data under the control of sets of instructions called
Write a program which takes a number n as input and prints YAYY if the sum of all digits
except the rightmost digit is equal to the rightmost digit., otherwise print OOPS. (10 marks)
For example: If user enters 2237, it will print YAYY because 2+2+3 is equal to 7.
Whereas, if user enters 3425, it will print OOPS because 3+4+2 is not equal to 5. Without using loops
A New Telephone Company has the following rate structure for long distance calls:
● The regular rate for a call is $0.10 per minute. (10 marks)
● Any call started at or after 6:00P.M. (1800 hours) but before 8:00A.M. (0800 hours) is
discounted 50 percent.
● Any call longer than 60 minutes receives a 15 percent discount on its cost (after any other
discount is subtracted).
● All calls are subject to a 4 percent federal tax on their final cost.
Write a program that reads the start time for a call based on a 24-hour clock and the length of the call. The gross cost (before any discounts or tax) should be printed, followed by the net cost (after discounts are deducted and tax is added). Print instructions to the user and compute the net cost
Write a c++ program that takes a number and a limit and prints multiples of a number upto the limit.
Memory constrained embedded systems, IoT devices cannot have liberty to use lots of
memory. You are tasked to store the result of a NUCES-FAST student in one single variable. This can
be done using all bits of that variable in an efficient way. Write a program which prompts user to enter
the following student data and convert all this information to store in a single variable (see sample run).
Use bitwise AND, OR and SHIFT operators. Also use if-else where needed.
Declare an array arr1 of length 10.
• Input the values from user.
• Pass that array to a function sorting.
• Your function should take a pointer as an argument.
• Sort the values of the array in ascending order in sorting.
Declare a float array of length 15 fArray.
. Input the values of fArray from user.
• Display the values of odd indexes using pointer arithmetic only.
Write an executable program in C++ to display an array of 6 rows and 2 colums, using a double line comment to display "computer programming"