The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 405 Weeks Ago, 5 Days Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
1.
Division Given two numbers a and b, use a more efficient algorithm (taught in class) to print the quotient and remainder of a/b.
The first line will contain a number t. The next t lines contain two numbers a and b.
For each test case, print the intermediate quotient after each iteration. Print one more line at the end with the final quotient and remainder seperated by spaces.
2
53 5
36 8
1
2
5
10
10 3
1
2
4
4 4
0=a,b=100000000(10^8)
2.
Fibonacci Given a number n, print the nth fibonacci number. The first 2 numbers of the fibonacci sequence are 0 and 1.
The first line contains a number t which denotes the number of test cases. Each of the next t lines contain an integer n
The output must contain exactly t lines such that the output on the ith line is the remainder of the respective fibonacci number when divided by 100000 (10^5).
3
3
5
100
1
3
69026
0n=10000(10^4
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll