Advertisement
mess0011

ue5_1

Nov 15th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication83
  8. {
  9.     class Program
  10.     {
  11.         public static int readnumber()
  12.         {
  13.             Console.WriteLine("pick a number!");
  14.             int nr = Convert.ToInt32(Console.ReadLine());
  15.             return nr;
  16.         }
  17.  
  18.         public static void output(int nr)
  19.         {
  20.             Console.WriteLine("the number you picked is {0}", nr);
  21.         }
  22.  
  23.         static void Main(string[] args)
  24.         {
  25.             int number = readnumber();
  26.             output(number);
  27.             Console.ReadLine();
  28.         }
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement