Flight Reservation Console App

Download Documentation   [code language=”csharp”] /* Mark Hesser * Nov 13, 2017 * Intro to P&L * Flight Reservation */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace Flight_Reservation_Console { class Program { public static void Main(string[] args) { //Declarations //File Paths string path = Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)).FullName; if (Environment.OSVersion.Version.Major >= 6) […]

Programming Problems

[code language=”csharp”] /* Mark Hesser Nov 3, 2017 Intro to P&L Programming Problems */ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Programming_Problems { class Program { static void Main(string[] args) { bool Quit = false; //Declarations bool[] program = new bool[8] { true, false, false, false, false, false, false, false }; […]

Base Salary Console App

[code language=”csharp”] using System; namespace BaseSalary { class MainClass { public static void Main(string[] args) { double baseSalary; double totalSales; double commissionRate; double totalPay; string continuetemp; bool Continue = true; while (Continue) { Console.Clear(); Console.Write("Enter Your Base Salary: "); if (Double.TryParse(Console.ReadLine(), out baseSalary)) { Console.Write("Enter your total sales: "); if (Double.TryParse(Console.ReadLine(), out totalSales)) { Console.Write("Enter […]

Random Number Game Form App

[code language=”csharp”] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; /* Mark Hesser October 17, 2017 Random Number Game Form App */ namespace Random_Number_Game { public partial class rand_num : Form { public rand_num() { InitializeComponent(); } int randNum, guess, prevGuess, tryCounter; string guessTemp; bool […]

Guess a Number Console App

[code lang=”csharp”] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; /* Mark Hesser October 17, 2017 Guess a Number Console */ namespace GuessConsole { class Program { static void Main(string[] args) { Console.Title = "Guess a Number"; // Declarations Random rnd = new Random(); int randNum = rnd.Next(1, 100), guess, prevGuess = randNum, […]

Input Output Console App

[code language=”csharp”] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Input_Output { class Program { static void Main(string[] args) { // Declarations string Name; string temp; int Age; double Temperature; bool goodInput; // input a string Console.Write("Please enter your name: "); Name = Console.ReadLine(); // output a string Console.WriteLine("You entered " + […]

Leap Year Form App

[code language=”csharp”] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace LeapYearForm { public partial class LeapYear : Form { public LeapYear() { InitializeComponent(); } static bool isLeapYear(int checkYear) { int year = checkYear; bool is_a_leap_year; if ((year % 4) == 0) { if ((year […]

Leap Year Console App

[code language=”csharp”] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Leap_Year { class Program { static void Main(string[] args) { int Year; int loopCount = 1; bool Continue = true; string Stop; bool leapYes = false; Console.WriteLine("This program tells you if the year has a leap year" + " and tells you […]