Associated Course(s):
Fundamentals of Programming with C

Given two numbers A and B. Perform addition, subtraction, division and multiplication on these two numbers and display result in a new line.

**Input: **First line of the input contains an integer T which denotes the number of test cases. For each test case there will be single line which contains two space seperated integers **A** and **B**.

**Output: **There should be four lines of output for each test case. Description of the 4 lines is shown below:

First Line: Result of addition of the two numbers

Second Line: Result of subtracting the smaller number from the greater number.

Third Line: Result of dividing greater number by the smaller number (Result will be in integer)

Fourth Line: Result of multiplication of the two numbers.

**Constraints:**

1 <= T <= 100

1 <= A <= 1000

1 <= B <= 1000

**Example:**

**Input:**

2

2 4

3 6

**Output:**

6

2

2

8

9

3

2

18

Author: harsh.agarwal0

BadiMehnatLagtiHaiEasySawalMe | 480 |

Jihye Sofia Seo | 187 |

RohitBattu | 176 |

MaaChudaApniBadiMehnatLagtiHaiEasySawal | 173 |

piyushmittal25 | 172 |

AdityaSharma16 | 490 |

BadiMehnatLagtiHaiEasySawalMe | 480 |

saumitra13325 | 452 |

blackshadows | 430 |

ashujack | 401 |

blackshadows | 5188 |

akhayrutdinov | 5099 |

Ibrahim Nash | 5071 |

Quandray | 4354 |

sanjay05 | 3668 |

Login to report an issue on this page.