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: | 406 Weeks Ago, 2 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
LAB ASSIGNMENT 1
q1
Test Rewrite small numbers from input to output. Stop processing input after reading in the number 42.
A list of numbers less than 100000000(10^8).
List of the input numbers until the first 42 is read.
1
2
8
42
99
1
2
8
q2
Finding The LCM Given two numbers a and b, print the lcm of a and b. LCM of two numbers a and b is defined as the smallest number which is divisible by both a and b.
The first line contains a number t which denotes the number of test cases. The next t lines contain 2 numbers a and b whose LCM needs to be found.
The output must contain exactly t lines such that the output on the ith line should be the output of the ith test case.
2
10 15
14 34
30
238
0a
0b
a*b=100000000(10^8)
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