SlideShare a Scribd company logo
1 of 3
Download to read offline
/*
* Created by Infinite90nine.
* User: H4x3r
* Date: 2/20/2016
* Time: 12:12 PM
*/
using System;
namespace tutorial
{
class Program
{
public static void Main(string[] args)
{
Console.WriteLine("choose a number to proceed.n");
Console.WriteLine("1.Send
Moneyn2.Depositn3.Withdrawn4.ChangePin.n");
int menu;
menu=Convert.ToInt32(Console.ReadLine());
switch(menu){
case 1: Console.WriteLine("sending money
interface.");
Console.WriteLine("nenter agent number");
int agentnumber;
agentnumber=Convert.ToInt32(Console.ReadLine());
if(agentnumber>9999&&agentnumber<999999){
Console.WriteLine("nenter amount to send");
}
else{
Console.WriteLine("Error! agent number must
be five digits");
}
double amount;
amount=Convert.ToInt64(Console.ReadLine());
if(amount>5&&amount<100001){
Console.WriteLine("nenter phone
number.");
}
else{
Console.WriteLine("n Error!
amount must be greater than 5 and less than 100001");
}
Console.ReadKey(true);
double phonenumber;
phonenumber=Convert.ToDouble(Console.ReadLine());
if(phonenumber>111111111&&phonenumber<11111111111){
Console.WriteLine("enter pin.");
}
else{
Console.WriteLine("Error.");
}
Console.ReadKey(true);
int pin;
pin=Convert.ToInt32(Console.ReadLine());
if(pin>999&&pin<99999){
Console.WriteLine("nCongratulations! You
have successfully sent money.",phonenumber);
Console.WriteLine("powered by Suditech.");
}
else {
Console.WriteLine("nError! Pin must be 4
characters.");
}
Console.ReadKey(true);
break;
case 2: Console.WriteLine("deposit interface.");
Console.WriteLine("nenter agent number");
int agent_number;
agent_number=Convert.ToInt32(Console.ReadLine());
if(agent_number>9999&&agent_number<999999){
Console.WriteLine("nenter amount to
deposit");
}
else{
Console.WriteLine("Error! agent number must
be five digits");
}
double deposit_amount;
deposit_amount=Convert.ToInt64(Console.ReadLine());
if(deposit_amount>5&&deposit_amount<100001){
Console.WriteLine("nenter phone
number.");
}
else{
Console.WriteLine("n Error!
amount must be greater than 5 and less than 100001");
}
Console.ReadKey(true);
double mobilenumber;
mobilenumber=Convert.ToDouble(Console.ReadLine());
if(mobilenumber>111111111&&mobilenumber<11111111111){
Console.WriteLine("enter pin.");
}
else{
Console.WriteLine("Error.");
}
int secretkey;
secretkey=Convert.ToInt32(Console.ReadLine());
if(secretkey>999&&secretkey<99999){
Console.WriteLine("Processing...");
Console.WriteLine("Amount deposited!");
Console.WriteLine("Powered by Suditech.");
}
break;
case 3 : Console.WriteLine("withdrawal interface.");
break;
case 4 : Console.WriteLine("chane pin interface.");
break;
default : Console.WriteLine("inavlid choice.");
break;
}
// TODO: Implement Functionality Here
Console.Write("Press any key to continue . . . ");
Console.ReadKey(true);
}
}
}

More Related Content

What's hot

Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-
Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-
Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-Gota Kakehi
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.harman kaur
 
Principais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-lasPrincipais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-lasJúlio Campos
 
Console programms
Console programmsConsole programms
Console programmsYasir Khan
 
Billing in a supermarket c++
Billing in a supermarket c++Billing in a supermarket c++
Billing in a supermarket c++varun arora
 
Quill - 一個 Scala 的資料庫存取利器
Quill - 一個 Scala 的資料庫存取利器Quill - 一個 Scala 的資料庫存取利器
Quill - 一個 Scala 的資料庫存取利器vito jeng
 
Freeing Tower Bridge
Freeing Tower BridgeFreeing Tower Bridge
Freeing Tower BridgeDave Cross
 
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleVladimir Kostyukov
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++ Arun Nair
 
2 19-2018-mean of all runs
2 19-2018-mean of all runs2 19-2018-mean of all runs
2 19-2018-mean of all runsAlexander Bitar
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++Bharat Kalia
 

What's hot (20)

Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-
Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-
Kinect勉強会 Vol.3 -ぼくのかんがえた最強のNUI-
 
Program to illustrate Switch, Goto and Exit statements.
Program to illustrate Switch, Goto and  Exit statements.Program to illustrate Switch, Goto and  Exit statements.
Program to illustrate Switch, Goto and Exit statements.
 
Principais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-lasPrincipais vulnerabilidades em Smart Contracts e como evitá-las
Principais vulnerabilidades em Smart Contracts e como evitá-las
 
Libtcc and gwan
Libtcc and gwanLibtcc and gwan
Libtcc and gwan
 
Console programms
Console programmsConsole programms
Console programms
 
Billing in a supermarket c++
Billing in a supermarket c++Billing in a supermarket c++
Billing in a supermarket c++
 
Ooprc3c
Ooprc3cOoprc3c
Ooprc3c
 
Quill - 一個 Scala 的資料庫存取利器
Quill - 一個 Scala 的資料庫存取利器Quill - 一個 Scala 的資料庫存取利器
Quill - 一個 Scala 的資料庫存取利器
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Freeing Tower Bridge
Freeing Tower BridgeFreeing Tower Bridge
Freeing Tower Bridge
 
Async Microservices with Twitter's Finagle
Async Microservices with Twitter's FinagleAsync Microservices with Twitter's Finagle
Async Microservices with Twitter's Finagle
 
Include
IncludeInclude
Include
 
basic programs in C++
basic programs in C++ basic programs in C++
basic programs in C++
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
Pratik Bakane C++
Pratik Bakane C++Pratik Bakane C++
Pratik Bakane C++
 
2 19-2018-mean of all runs
2 19-2018-mean of all runs2 19-2018-mean of all runs
2 19-2018-mean of all runs
 
Oopsprc1e
Oopsprc1eOopsprc1e
Oopsprc1e
 
Basic Programs of C++
Basic Programs of C++Basic Programs of C++
Basic Programs of C++
 
C++ programs
C++ programsC++ programs
C++ programs
 

Similar to Mpesa_C# (2)

C# console programms
C# console programmsC# console programms
C# console programmsYasir Khan
 
Listing for MyNumberFormats
Listing for MyNumberFormatsListing for MyNumberFormats
Listing for MyNumberFormatsDerek Dhammaloka
 
Unit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingUnit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingvrgokila
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word documentSyed Umair
 
C++ project
C++ projectC++ project
C++ projectSonu S S
 
Final requirement in programming vinson
Final requirement in programming  vinsonFinal requirement in programming  vinson
Final requirement in programming vinsonmonstergeorge
 
Final requirement in programming niperos
Final requirement in programming   niperosFinal requirement in programming   niperos
Final requirement in programming niperosmarkings17
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd marchRajeev Sharan
 
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101premrings
 
computer project by sandhya ,shital,himanshi.pptx
computer project by sandhya ,shital,himanshi.pptxcomputer project by sandhya ,shital,himanshi.pptx
computer project by sandhya ,shital,himanshi.pptxIshooYadav
 
04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-maznabili
 
Please observe the the code and validations of user inputs.import .pdf
Please observe the the code and validations of user inputs.import .pdfPlease observe the the code and validations of user inputs.import .pdf
Please observe the the code and validations of user inputs.import .pdfapexjaipur
 
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfC# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfssuserc77a341
 

Similar to Mpesa_C# (2) (20)

C# console programms
C# console programmsC# console programms
C# console programms
 
Listing for MyNumberFormats
Listing for MyNumberFormatsListing for MyNumberFormats
Listing for MyNumberFormats
 
Unit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programmingUnit 1 ocs752 introduction to c programming
Unit 1 ocs752 introduction to c programming
 
C#.net
C#.netC#.net
C#.net
 
Loops (1)
Loops (1)Loops (1)
Loops (1)
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
New microsoft office word document
New microsoft office word documentNew microsoft office word document
New microsoft office word document
 
C++ project
C++ projectC++ project
C++ project
 
Final requirement in programming vinson
Final requirement in programming  vinsonFinal requirement in programming  vinson
Final requirement in programming vinson
 
C programs
C programsC programs
C programs
 
Final requirement in programming niperos
Final requirement in programming   niperosFinal requirement in programming   niperos
Final requirement in programming niperos
 
Rajeev oops 2nd march
Rajeev oops 2nd marchRajeev oops 2nd march
Rajeev oops 2nd march
 
Bookstore-Project
Bookstore-ProjectBookstore-Project
Bookstore-Project
 
54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
 
RandomGuessingGame
RandomGuessingGameRandomGuessingGame
RandomGuessingGame
 
C # (2)
C # (2)C # (2)
C # (2)
 
computer project by sandhya ,shital,himanshi.pptx
computer project by sandhya ,shital,himanshi.pptxcomputer project by sandhya ,shital,himanshi.pptx
computer project by sandhya ,shital,himanshi.pptx
 
04 Console input output-
04 Console input output-04 Console input output-
04 Console input output-
 
Please observe the the code and validations of user inputs.import .pdf
Please observe the the code and validations of user inputs.import .pdfPlease observe the the code and validations of user inputs.import .pdf
Please observe the the code and validations of user inputs.import .pdf
 
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdfC# 6Write a program that creates a Calculation ClassUse the foll.pdf
C# 6Write a program that creates a Calculation ClassUse the foll.pdf
 

Mpesa_C# (2)

  • 1. /* * Created by Infinite90nine. * User: H4x3r * Date: 2/20/2016 * Time: 12:12 PM */ using System; namespace tutorial { class Program { public static void Main(string[] args) { Console.WriteLine("choose a number to proceed.n"); Console.WriteLine("1.Send Moneyn2.Depositn3.Withdrawn4.ChangePin.n"); int menu; menu=Convert.ToInt32(Console.ReadLine()); switch(menu){ case 1: Console.WriteLine("sending money interface."); Console.WriteLine("nenter agent number"); int agentnumber; agentnumber=Convert.ToInt32(Console.ReadLine()); if(agentnumber>9999&&agentnumber<999999){ Console.WriteLine("nenter amount to send"); } else{ Console.WriteLine("Error! agent number must be five digits"); } double amount; amount=Convert.ToInt64(Console.ReadLine()); if(amount>5&&amount<100001){ Console.WriteLine("nenter phone number."); } else{ Console.WriteLine("n Error! amount must be greater than 5 and less than 100001"); } Console.ReadKey(true); double phonenumber; phonenumber=Convert.ToDouble(Console.ReadLine()); if(phonenumber>111111111&&phonenumber<11111111111){ Console.WriteLine("enter pin."); } else{ Console.WriteLine("Error."); } Console.ReadKey(true); int pin; pin=Convert.ToInt32(Console.ReadLine());
  • 2. if(pin>999&&pin<99999){ Console.WriteLine("nCongratulations! You have successfully sent money.",phonenumber); Console.WriteLine("powered by Suditech."); } else { Console.WriteLine("nError! Pin must be 4 characters."); } Console.ReadKey(true); break; case 2: Console.WriteLine("deposit interface."); Console.WriteLine("nenter agent number"); int agent_number; agent_number=Convert.ToInt32(Console.ReadLine()); if(agent_number>9999&&agent_number<999999){ Console.WriteLine("nenter amount to deposit"); } else{ Console.WriteLine("Error! agent number must be five digits"); } double deposit_amount; deposit_amount=Convert.ToInt64(Console.ReadLine()); if(deposit_amount>5&&deposit_amount<100001){ Console.WriteLine("nenter phone number."); } else{ Console.WriteLine("n Error! amount must be greater than 5 and less than 100001"); } Console.ReadKey(true); double mobilenumber; mobilenumber=Convert.ToDouble(Console.ReadLine()); if(mobilenumber>111111111&&mobilenumber<11111111111){ Console.WriteLine("enter pin."); } else{ Console.WriteLine("Error."); } int secretkey; secretkey=Convert.ToInt32(Console.ReadLine()); if(secretkey>999&&secretkey<99999){ Console.WriteLine("Processing..."); Console.WriteLine("Amount deposited!"); Console.WriteLine("Powered by Suditech."); } break; case 3 : Console.WriteLine("withdrawal interface."); break;
  • 3. case 4 : Console.WriteLine("chane pin interface."); break; default : Console.WriteLine("inavlid choice."); break; } // TODO: Implement Functionality Here Console.Write("Press any key to continue . . . "); Console.ReadKey(true); } } }