2-0. Integer four Arithmetic (10), 2-0 integer four arithmetic 10
This topic requires programming to calculate the sum, difference, product, and Quotient of two positive integers and output them. Ensure that all input and output are in the Integer Range.
Input Format:
Input two integers A and B in A row.
Output Format:
Output and, difference, product, and Quotient in the order of format "A Operator B = Result" in the four rows.
Input example:
3 2
Output example:
3 + 2 = 53 - 2 = 13 * 2 = 63 / 2 = 1
1 #include <stdio.h> 2 int main() 3 { 4 int a,b; 5 6 scanf("%d %d",&a, &b); 7 printf("%d + %d = %d\n%d - %d = %d\n%d * %d = %d\n%d / %d = %d",a, b, a+b, a, b, a-b, a, b, a*b, a, b, a/b); 8 9 return 0; 10 }
I tried to compile a simple program in C language that can perform arithmetic operations of four integers less than 10.
Then you define a string variable s.
Then, traverse s to find two numbers and operators.
The number must be obtained through int CtoI (char ).
Good luck ~
Mathematics: Perform addition, subtraction, multiplication, division, and division four operations on integers 2, 3,-6, and 10 (each number is used only once) so that the calculation result is 24, and the formula can be ___
Hello, charming and cool girl:
2x(3x(-6 + 10 ))
(2 × 3) × (-6 + 10)
(2x3)-10) x-6
2x(3x(10-6 ))
(2 × 3) × (10-6)
2x(-6 + 10) x 3)
(2x(-6 + 10) x 3
(2-10) × (3-6)
(2-10) × (-6 + 3)
2 × (10-(-6/3 ))
2 × (10-6) × 3)
(2 x (10-6) x 3
3 × (2 × (-6 + 10 ))
(3 × 2) × (-6 + 10)
3/(2/(10--6 ))
(3/2) × (10--6)
(3 × 2)-10) ×-6
3 × (2 × (10-6 ))
(3 × 2) × (10-6)
(3-6) × (2-10)
3× (-6 + 10) × 2)
(3x(-6 + 10) x 2
3 × (10--6)/2)
(3 × (10--6)/2
3× (10-6) × 2)
(3 x (10-6) x 2
-6 × (2 × 3)-10)
(-6 + 3) × (2-10)
-6× (3 × 2)-10)
(-6 + 10) × 2) × 3
(-6 + 10) × (2 × 3)
(-6 + 10) x 3) x 2
(-6 + 10) × (3 × 2)
(10--6)/(2/3)
(10--6)/2) × 3
(10-6) × 2) × 3
(10-6) × (2 × 3)
(10-(-6/3) × 2
(10--6) × 3)/2
(10--6) × (3/2)
(10-6) × 3) × 2
(10-6) × (3 × 2)