Advertisement
fbinnzhivko

01.02 Account Information

May 16th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main()
  5.     {
  6.         var firstName = Console.ReadLine();
  7.         var lastName = Console.ReadLine();
  8.         var id = int.Parse(Console.ReadLine());
  9.         var totalBalance = double.Parse(Console.ReadLine());
  10.  
  11.         Console.WriteLine("Hello, {0} {1}", firstName, lastName);
  12.         Console.WriteLine("Client id: {0}", id);
  13.         Console.WriteLine("Total balance: {0:f2}", totalBalance);
  14.         if (totalBalance >= 0) { Console.WriteLine("Active: yes"); }
  15.         else { Console.WriteLine("Active: no"); }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement