Questions tagged [subtraction]

Subtraction is a mathematical operation that represents the removal of an object from a collection.

Subtraction is a mathematical operation that represents the removal of an object from a collection. The minus sign (-) signifies subtraction.

Subtraction is anticommutative, meaning that changing the order changes the sign of the answer. It is not associative, meaning that when one subtracts more than two numbers, order in which subtraction is performed matters.

Basic Subtraction

You can imagine a number line that begins at position 3. If you subtract 2 from the starting position of 3, you will be left with 1.

3 - 2 = 1

3-2 number line

Source

1476 questions
-6
votes
1 answer

Euclidean Algorithm (subtraction) in python

In "Great Mathematical problems -- Vision of infinity", page 18 Ian Stewart referred Euclid's proposition 2, Book VII of Element which is a very elementary method of finding Greatest common divisor. I quote "It works by repeatedly subtracting the…
-6
votes
2 answers

Time Subtract in PHP

I need help to subtract 2 times in PHP. Example: $date1 = 02:40; $date2 = 00:00; $finaldate = $date1 - $date2; the correct answer will be 21:20.
Fred Mj
  • 11
  • 4
-6
votes
1 answer

string has no member named 'subtr' error

Thank you for reading. I am making a script to read a birthday in this format: month/day/year, and separate the year, day, and month. I got the year part, but for the day part, I am trying to subtract the position values of the second '/' and the…
NewProgrammer
  • 39
  • 1
  • 6
-6
votes
1 answer

subtract from hour not in time format in php

I got time in this format: "192:40" 192=Hours, 40 = minutes. Lets say I want to substract "02:30" hours so the answer will be "190:10".. Is there any way doing it? Thanks!
user1424332
  • 245
  • 1
  • 2
  • 7
-9
votes
2 answers

How to subtract 08/22/2013 18:38:42 - 07/26/2013 14:56:39 with output format 2.4 days

How to subtract 08/22/2013 18:38:42 - 07/26/2013 14:56:39 in Excel to return in the format 2.4 days?
-11
votes
1 answer

Reduse integer everytime an new object is added to arraylist

I have a class of Person with an ArrayList of the class Groceries. Let's name the Arraylist shoppingBag. Student and Groceries has one field each, int money and int price. The specific amount of money and price is up to you when initializing new…
user6900432
1 2 3
98
99