What is Thread Synchronization?
Write a C/C++ program to sort a list of elements using the merge sort algorithm.
Note: Merge sort is an O(n log n) comparison-based sorting algorithm. Most implementations produce a stable sort, which means that the implementation preserves the input order of equal elements in the sorted output.
Write a program to sort an array of floating-point numbers in descending order using merge sort ?
Body Mass Index (BMI) is one of the criteria that is used to calculate whether one is fit or not basing on a person’s height (m) and weight (kg). The criterion is very simple; if one’s BMI is 25 or greater, it signifies overweight. A BMI less or equal to 18.5 indicates underweight. Lastly, a BMI greater than 30 shows obesity.
You have been requested to create a program that that helps the Namibian Defence Forces’ (NDF) Captain to calculates the BMI of a person (BMI = weight/height2) and also determine whether the person has also completed running 10 km in the required time. Men should complete 10km in less than 60 minutes for them to be accepted. Women should do that under 80 minutes. Both males and females are accepted if their BMI is less than 25 and greater than 18.5. For 2018 intake, there are already 6 males selected and 1 female. The values for gender, mass and weight are enter by user inputs
Write a program in C++, which perform two operator overloading function for A=2*B,where A and B are the objects of the same class.
Write a program in C++, which perform two operator overloading function for A=2+B,where A and B are the objects of the same class.
create a plan for a program that will let the user to choose from circle or a rectangle.Must compute the area.
Exercise 1 : Practice to manipulate character arrays
A palindrome is a word, phrase, number or other sequence of characters which reads the same backward and forward.
Write a C program that enter a word, store it in an array and determine whether it is palindrome or not.
Example : CIVIC is a palindrome
HOT is a not a palindrome
You've learned in the past lessons on how to use square root functions, right? Then let's take your knowledge to the test. Print out the square root of a given integer with only two decimal places.
Ready, solve, and go!
Input
A line containing an integer.
4Output
A line containing a decimal with two decimal places.
2.00NOTE: There are several test cases resulting in different values.
Multiplying two numbers is a piece of cake, but how about multiplying three of them, either being a negative of positive number? With programming and proper code, these tasks are easy to handle.
You're a programmer, right? Then code this one for me!
Input
A line containing three numbers (positive or negative, may have decimal places) separated by a space.
1.6·-2·-1Output
A line containing a decimal/float with one decimal place.
NOTE: There are several test cases with different input which results in different output