How to judge the same number in three digits in C language?

How to judge the same number in three digits in C language?


int X=123;
int a,b,c;
a=X/100;
b=X/10%10;
c=X%10;
if(a==b || a==c || b==c)
print("There are same nums");



How to control the number of significant digits in C language?
It doesn't control the decimal places
Is the number of control significant digits
For example, if you control 5 significant digits, you can output numbers such as 0.12345, 1.2345, and 12.345


When using printf output, use example% 5.2f 5 bits, of which two decimal places,
%-5.2f left alignment without "-" is right alignment. Etc



How to write a program in C language, input any positive integer, output every bit in reverse order


#include
int main()
{
int n;
scanf("%d", &n);
do
{
printf("%d", n % 10);
}while(n /= 10);
printf("\n");
return 0;
}



If a = {x | x | is less than or equal to 1, X belongs to R}, B {y | y = the square of X, X belongs to R}, then a is not b=


|x|



Let u = R, set a {X / X-1} be less than or equal to 1}, and B = {X / X square-4 is less than or equal to 0}, then the intersection of a (the complement of B) =?


[interpretation]
The complement of B = {x | x ^ 2-4 > 0} = (- ∞, - 2) U (2, ∞)
A={x|x-1≤ 1}=(-∞,2]
So a intersection (complement of B) = (∞, - 2)



Calculate the volume of the ring formed by the circle x ^ 2 + (Y-5) ^ 2 = 16 rotating around the X axis


(Application of definite integral) the volume of the ring body = ∫ [π (5 + √ (16-x & # 178;), # 178;), - π (5 - √ (16-x & # 178;), # 178;] DX = 40 π ∫ √ (16-x & # 178;) DX = 40 π ∫ 4cost * 4costdt (let x = 4sint) = 320 π ∫ [1 + cos (2t)] DT (using the angle doubling formula) = 320 π [T + sin (2t) / 2]



Circle (X-5) ^ 2 + y ^ 2 revolves around the Y axis to generate the volume of the revolving body. Is the enclosed figure the shape of chess or the shape of lifebuoy? What's the specific method
The equation for a circle is 16


Try to answer, we can see that the main difference in shape between chess and lifebuoy is that chess is solid, while lifebuoy is hollow. Let's look at the circle equation again, its leftmost tangent is still 1 distance from y-axis, so it must be hollow after rotating. So the answer is lifebuoy shape



The maximum and minimum value of function FX = x & # 178; + 2x + 3 in the interval [- 2.4] are? And? Respectively?


Axis of symmetry x = - B / 2A = - 2 / 2 = - 1
So when x = - 1, the minimum value is 1-2 + 3 = 2
Monotone decreasing in (- Infinity - 1]
Monotonically increasing in [- 1 + infinity)
So we get the maximum f (4) = 16 + 8 + 3 = 16 + 11 = 27 when x = 4



Given X / 2 = Y / 3 = Z / 4, find the value of x ^ 2 + 2Y ^ 2 + 3Z ^ 2 / XY + YZ ZX


Ask: forget to add brackets, the title should be (x ^ 2 + 2Y ^ 2 + 3Z ^ 2) / (XY + YZ ZX), if it is, then the solution is: X: Y: z = 2:3:4, let x = 2A, y = 3A, z = 4A, (x ^ 2 + 2Y ^ 2 + 3Z ^ 2) / (XY + YZ ZX) = (4a ^ 2 + 2 * 9A ^ 2 + 3 * 16A ^ 2) / (6a ^ 2 + 12a ^ 2-8a ^ 2) = (70A ^ 2) / (10



Given that the square of x plus xy = m, the square of Y - xy = n, use M, n to express the square of X - 3xy plus the square of 4Y = what; the square of 2x plus the square of 4xy-2y = what


M = x ^ 2 + XY n = y ^ 2-xy problem 1: x ^ 2 - 3xy + 4Y ^ 2 = (x ^ 2 + XY) + 4 (y ^ 2 - XY) = m - 4N problem 2: 2x ^ 2 + 4xy - 2Y ^ 2 = 2 (x ^ 2 + 2XY - y ^ 2) = 2 [(x ^ 2 + XY) - (y ^ 2 - XY)] = 2 (M - n) = 2m - 2n