Advertisement
rewei

ram7

Nov 6th, 2017
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1. using System;
  2. public class ManyMethods
  3. {
  4. public static void Main()
  5. {
  6. //Get the values
  7. double value1 = GetNumber();
  8. double value2 = GetNumber(); //Do division
  9. Division(value1, value2);
  10. }
  11. public static double GetNumber()
  12. { string numString;
  13. double number;
  14. Console.Out.Write("Enter a number: ");
  15. numString = Console. ReadLine();
  16. number = Convert.ToDouble(numString);
  17. return number;
  18. }
  19. public static void Division (double numerator, double denominator)
  20. {
  21. double quotient = numerator / denominator; Console.Out.WriteLine (numerator + " divided by " + denominator + " equals ");
  22. Console.Out.WriteLine (quotient);
  23. return;
  24. }
  25. }
  26. download full Project from Here:::
  27. http://viwright.com/1eRH
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement