Advertisement
Guest User

klasa operations

a guest
Jun 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.52 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ispit
  4. {
  5.     class Operations
  6.     {
  7.         public static double Deposite(double InitAmmt)
  8.         {
  9.             Console.Write("Enter an ammount you wish to deposite: ");
  10.             double AddAmmt = Convert.ToDouble(Console.ReadLine());
  11.             return AddAmmt;
  12.         }
  13.  
  14.         public static double Withdraw (double InitAmmt)
  15.         {
  16.             Console.Write("Enter an ammount you wish to withdraw: ");
  17.             double SubAmmt = Convert.ToDouble(Console.ReadLine());
  18.             return SubAmmt;
  19.         }
  20.        
  21.         public static int ChangePassword ()
  22.         {
  23.          Console.WriteLine("Enter your new password: ");
  24.          int NewPw = Convert.ToInt32(Console.ReadLine());
  25.             while (true)
  26.             {
  27.                 Console.WriteLine("Confirm your new password: ");
  28.                 int NewPw1 = Convert.ToInt32(Console.ReadLine());
  29.                 if (NewPw == NewPw1)
  30.                 {                    
  31.                 return NewPw;
  32.                 }
  33.                 else
  34.                 {
  35.                 Console.WriteLine("Passwords do not match. Try again!");
  36.                 }
  37.             }
  38.            
  39.         }
  40.         public static void Print(Customers print)
  41.         {
  42.             Console.WriteLine(print.Name);
  43.             Console.WriteLine(print.Address);
  44.             Console.WriteLine(print.Phone);
  45.             Console.WriteLine(print.AccountNumber);
  46.             Console.WriteLine(print.InitialAmmount);
  47.  
  48.         }      
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement