C++

06/16/19

Sleep for milliseconds?

I know the POSIX `sleep(x)` function makes the program sleep for x seconds. Is there a function to make the program sleep for x *milliseconds* in C++?

Union and Intersection using interval notation

D and E are sets of real numbers defined as follows.D={y|y<4}E={y|y\ge 7}D ∪ E =D ∩ E =
C

06/15/19

find if 4 points on a plane form a rectangle?

Can somebody please show me in C-style pseudocode how to write a function (represent the points however you like) that returns true if 4-points (args to the function) form a rectangle, and false... more

3 1/3x-2=-4(x+7) - Geometry Honors

Can someone help me solve this equation: 3 1/3x - 2 = -4(x+7)

06/15/19

Defective items probability question.?

Hi I'm working with probability as part of an engineering course, and I'm struggling with the following tutorial question: Components of a certain type are shipped to a supplier in batches of ten.... more

The selling price of a​ refrigerator, is ​$ 763.20 763.20. If the markup is 20 % 20% of the​ dealer's cost, what is the​ dealer's cost of the​ refrigerator?

The selling price of a​ refrigerator, is ​$763.20763.20. If the markup is 20 %20% of the​ dealer's cost, what is the​ dealer's cost of the​ refrigerator?

06/14/19

How do I define and use an ENUM in Objective-C?

I declared an enum in my implementation file as shown below, and declared a variable of that type in my interface as PlayerState thePlayerState; and used the variable in my methods. But I am... more

Similar Triangles Math Problem

An airplane is from daejeon to busan. From the plane, the angle of depression to busan is 8 degrees, The air plane is in the air, and has traveled to a horizontal distance of 117 km. From... more

06/14/19

If a seed is planted, it has a 75% chance of growing into a healthy plant. If 10 seeds are planted, what is the probability that exactly 3 don't grow?

If a seed is planted, it has a 75% chance of growing into a healthy plant.If 10 seeds are planted, what is the probability that exactly 3 don't grow?

06/14/19

Please help me with my math

A graphics printing company sells three different sizes of posters. They use all of a 33”by 33” poster board and cut it into three pieces. The smallest one is a square, and the largest one will... more
C

06/14/19

What's the best way to check if a file exists in C?

Is there a better way than simply trying to open the file? int exists(const char *fname) { FILE *file; if ((file = fopen(fname, "r"))) { fclose(file); ... more
C

06/13/19

In C, why do some people cast the pointer before freeing it?

I'm working on an old code base and pretty much every invocation of free() uses a cast on its argument. For example, free((float *)velocity); free((float *)acceleration); free((char *)label);where... more

Polynomials and real numbers

If two polynomial equations have real solutions, then will the equation that is the result of adding, subtracting, or multiplying the two polynomial equations also have real solutions? Will the... more

06/13/19

Statistic/Probability

Suppose that P(A) = 1/5, P(B) = 4/5, and P(A or B ) = 1/3. Are A and B disjoint events? What is the value of 𝑃(𝐴|𝐵)?
C

06/13/19

Why does scanf() need "%lf" for doubles, when printf() is okay with just "%f"?

Why is it that `scanf()` needs the `l` in "`%lf`" when reading a `double`, when `printf()` can use "`%f`" regardless of whether its argument is a `double` or a `float`?Example code: double d; ... more

06/13/19

what is answer of this quester

the base of a trianglar sail will be 3 meters wide .how tall. in meters, must the sail be to have an area of 7.5 square meters

06/13/19

what percentage of test-takers scored between the average and this student’s score?

Nationwide, GMAT scores in a particular year had an average of 492 with astandard deviation of 100 and the scores roughly followed a normal curve. If astudent scored 600 on the exam, approximately... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.