Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Dylan Cox
- //October 22 2019
- //Write a function that takes an integer parameter called dozens and outputs how many eggs are in those dozens.
- using System;
- class MethodDemo
- {
- static int doit ()
- {
- int fullnumber;
- fullnumber=Console.WriteLine(dozens*12);
- }
- public static void Main ()
- {
- Console.WriteLine("How many egg cartons would you like?");
- int dozens;
- dozens=Console.ReadLine();
- Console.WriteLine("The total number of eggs in these cartons is: ");
- doit();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement