Advertisement
AnitaN

02.PrimitiveDataTypesVariables/11.EmployeeDate

Mar 11th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.01 KB | None | 0 0
  1. //A marketing company wants to keep record of its employees. Each record would have the following characteristics:
  2. //-First name
  3. //-Last name
  4. //-Age (0...100)
  5. //-Gender (m or f)
  6. //-Personal ID number (e.g. 8306112507)
  7. //-Unique employee number (27560000…27569999)
  8. //Declare the variables needed to keep the information for a single employee using appropriate primitive data types. Use descriptive names. Print the data at the console.
  9.  
  10. using System;
  11.  
  12. class EmployeeDate
  13. {
  14.     static void Main()
  15.     {
  16.         string firstName = "Petar";
  17.         string lastName = "Petrov";
  18.         byte age = 25;
  19.         char gender = 'm';
  20.         long id = 8306112507;
  21.         uint uniNumber = 27560000;
  22.         Console.WriteLine("First Name:{0}", firstName);
  23.         Console.WriteLine("Last Name:{0}", lastName);
  24.         Console.WriteLine("Age:{0}", age);
  25.         Console.WriteLine("Gender:{0}", gender);
  26.         Console.WriteLine("ID:{0}", id);
  27.         Console.WriteLine("Unique Employee Number:{0}", uniNumber);
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement