a. Declare an array of string title with 4 elements.
b. Initialize the array with the follows: “Mid1”, “Mid2”, “Final”, “total”.
c. Declare an array of integers scores with 4 elements.
d. Use the loop to read from the scores array the three scores and calculate total and put the result in the fourth array element.
e. Declare an array of float percentage with 4 elements.
f. Calculate the percentage of the score in each of element, assuming that the full mark is 60
g. Print the three arrays.
The output should be as follows:-
---------------------------
Enter your score in Mid1: 20
Enter your score in Mid2: 15
Enter your score in Final: 12
Mid1 20 33.3%
Mid2 15 25.0%
Final 12 20.0%
Total 47 78.3%
write a c++ program that takes array values as an input .for each array element, find the difference between that element and last array element and update the array.
array can be of any size.
example:
input array: 1, 4, 5, 6, 7, 2
Exercise 1
a. Declare an array of integers scores with 4 elements.
b. Put in the array with the follows: 20, 15, 12, 47
c. Declare an array of string title with 4 elements.
d. Initialize the array with the follows: “Mid1”, “Mid2”, “Final”, “total”.
e. Print the two table of grads (score and title) using for loop.
The output will as the follows:-
---------------------------
Mid1 20
Mid2 15
Final 12
Total 47
Develop a solution that will calculate the average temperature, given a set of temperatures. The number of temperatures may differ from time to time. (Use a trip values to stop the processing of the loop.) Test the solution with the following 10 temperatures.
78 90
85 80
87 83
75 90
86 70
Given two boolean values
isGrassTrimmerFound and isWaterHosePipeFound as inputs, create three JS promises using async/await and try/catch blocks.
For cutting the grass,
resolve with "Grass Trimmed" text, if the isGrassTrimmerFound is true
reject with "Grass Trimmer Not Found" text, if the isGrassTrimmerFound is false
For cleaning the garden,
resolve with "Garden Cleaned" text
For watering the plants,
resolve with "Watered Plants" text, if the isWaterHosePipeFound is true
reject with "Water Hose Pipe Not Found" text, if the isWaterHosePipeFound is false
Input
The first line of input contains a boolean isGrassTrimmerFound
The second line of input contains a boolean isWaterHosePipeFound
Sample Input 1
true
true
Sample Output 1
Grass Trimmed
Garden Cleaned
Watered Plants
Sample Input 2
true
false
Sample Output 2
Grass Trimmed
Garden Cleaned
Water Hose Pipe Not FoundGet the top 3 genre_ids that are liked by the users in India in the year 2018.
genre_id no_of_likes
... ...
Get top 5 genres in the platform with most positive user activity, i.e., the genres with videos having more number of likes.
genre_id genre_type no_of_likes
.... ... ..
Get all the potential users. Fetch the user_ids who liked at least 2 videos published by "Disney" channel, and who did not subscribe to the channel (channel_id = 352).
potential_user_id no_of_likes
... ...
Get all the user_ids who liked at least 5 videos published by "Tedx" channel.
active_user_id no_of_likes
... ...
Get the active users of the platform. Consider the users who liked at least fifty videos are considered active users.
active_user_id no_of_likes
... ...