make a c++ program that will calculate body mass index using if-else condition.
Using class name studgrade with public data members and functions, create a program that will allow user to enter students A's grades in her five(5) major subjects, compute and display for the average grade of the student.
Create a program that will accept two numbers and print the product, quotient, sum, difference, remainder, exponent and floor division. First number will be the left operand for quotient, difference, remainder, exponent, and floor division. Also, it prints "True" if it satisfies the condition and "False" otherwise: First number is within 10 and 20
Second number is within 10 and 20
the functions of each layer of the osi model and protocols used
One of the streets in your city has a total of L street lights. Each light i covers the street from
Xi to Yi distance. Find the length of street covered with light.
Input Specification:
input1: L, denoting the number of street lights.
input2: An array of L* 2 elements. For each row i, (Xi, Yi) denote that the
street light i covers the distance from Xi to Yi.
Output Specification:
Your function should return the length of the street covered with light.
Example 1:
input1: 1,
input2: {{5,10 } }
Output: 5
N number of people participated in a coding marathon where they were asked to solve some problems. Each problem carried 1 mark and at the end of the marathon,
the total marks that each person achieved was calculated.
As an organizer, you have the list of the total marks that each person achieved. You have to calculate the sum of the marks of top K scorers from the list.
Input Specification:
input1: N, Total number of participants
input2: K, Top scorers
input3: An array of length N with the scores of all N participants
Output Specification:
Return S, sum of the marks of top K scorers from the list.
Example 1:
input1: 4
input2: 2
input3: {4, 1, 2, 5}
Output: 9
Explanation: Top 2 scores are 5 and 4. Sum = 5+4=9.
Example 2:
input1: 4
input2: 3
input3: {4, 3, 6, 1}
Output: 13
Explanation: Top 3 scores are 6, 4 and 3. Sum = 6+4+3=13.
N number of people participated in a coding marathon where they were asked to solve some problems. Each problem carried 1 mark and at the end of the marathon,
the total marks that each person achieved was calculated.
As an organizer, you have the list of the total marks that each person achieved. You have to calculate the sum of the marks of top K scorers from the list.
Input Specification:
input1: N, Total number of participants
input2: Top scorers
input3: An array of length N with the scores of all N participants
Output Specification:
Return S, sum of the marks of top K scorers from the list.
Example 1:
input1: 4
input2: 2
input3: {4, 1, 2, 5}
Output: 9
Explanation: Top 2 scores are 5 and 4. Sum = 5+4=9.
Example 2:
input1: 4
input2: 3
input3: {4, 3, 6, 1}
Output: 13
Explanation: Top 3 scores are 6, 4 and 3. Sum = 6+4+3=13.
A special unit is formed within the police force of N policeman,such that no 2 policeman have equal ranking. The rank of a policeman is depicted by the number of
stars in his badge. There are a total of N policeman each having a badge containing some stars.
your task is to calculate the minimum number of extra starsthat need to be bought in order to meet the above constraint.
Note: A star cannot be removed from a badge.
Input Specification:
input1: N denoting the number of policeman in the special unit.
input2: An array of N elements[A1,A2,..AN] where Ai denotes the number of stars on the badge Ai.
Output Specification:
Your function should return the minimum number of extra stars required.
Add two polynomials
Given two polynomials A and B, write a program that adds the given two polynomials A and B
For term Cix^Pi, if the coefficient of the term Ci is 1, simply print x^Pi instead of 1x^Pi.
If the degree of the polynomial is zero and the constant term is also zero, then just print 0 to represent the polynomial.
Sample Input
4
0 5
1 0
2 10
3 6
3
0 1
1 2
2 4
Sample Output
12x^4 + 9x^3 - 5x^2 - x - 1
An array containing 10 predefined double values are already provided for you in the code editor. Print each of the element out in separate lines, starting from the last array element down to the first.
Each outputted value must also only show up to two decimal places.
Output
Multiple lines containing a float number.
5.10
5.50
4.00
4.02
3.00
3.66
2.50
2.20
1.21
1.40