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: | 431 Weeks Ago, 6 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. (TCOs 3, 7, and 8) Which of the following is an advantage of modular code? (Points : 3) Allows teamwork
Reusability of code
Reduced complexity of design
All of the above
calculateEmployeePay() salesTax() validateInputDate() |
string public input |
| Question 4. 4. (TCOs 6 and 8) Which is the output of the following C# code if the numbers input are 5 and then 20? static void Main(string[] args) { int n1, n2, temp; Console.Write("Enter a number: "); n1 = Convert.ToInt32(Console.ReadLine()); Console.Write("Enter a number: "); n2 = Convert.ToInt32(Console.ReadLine()); temp = goofy(n1, n2); Console.WriteLine("The answer is " + temp); Console.ReadLine(); } public static int goofy(int x, int y) { int ans; if (x>y) { ans = 2 * (x-y); } else if (x<y) { ans = 2*(x+y); } else { ans = x+y; } return ans; } (Points : 4) |
20
30
50
25
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