Constant Limit = 1000; % Sufficient digits. Constant Base = 10; % The base of the simulated arithmetic. Constant FactorialLimit = 365; % Target number to solve, 365! Array digit[1:Limit] of integer; % The big number. Integer carry,d; % Assistants during multiplication. Integer last,i; % Indices to the big number's digits. Array text[1:Limit] of character; % Scratchpad for the output. Constant tdigit[0:9] of character = ["0","1","2","3","4","5","6","7","8","9"]; BEGIN digit:=0; % Clear the whole array. digit[1]:=1; % The big number starts with 1, last:=1; %
Chat with our AI personalities
2 equivalent fractions for 15 and 23 = 30/46, 45/69
The two fractions are -181/2 and 191/2.
The sum of those fractions is 9 over 10 or 9/10.
7272 * * * * * WRONG! Sum from 23 to 123 = (sum from 1 to 123) minus (sum from 1 to 22) = 123*124/2 - 22*23/2 = 7626 - 253 = 7373. NOT 7272!
You must convert the fractions to equivalent fractions with a common denominator, which in this case is 20.