Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class ManyMethods
- {
- public static void Main()
- {
- //Get the values
- double value1 = GetNumber();
- double value2 = GetNumber(); //Do division
- Division(value1, value2);
- }
- public static double GetNumber()
- { string numString;
- double number;
- Console.Out.Write("Enter a number: ");
- numString = Console. ReadLine();
- number = Convert.ToDouble(numString);
- return number;
- }
- public static void Division (double numerator, double denominator)
- {
- double quotient = numerator / denominator; Console.Out.WriteLine (numerator + " divided by " + denominator + " equals ");
- Console.Out.WriteLine (quotient);
- return;
- }
- }
- download full Project from Here:::
- http://curs.io/lCCS2C2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement