This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sing System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Elimination | |
| { | |
| internal class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Airline | |
| { | |
| internal class Program | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Message to user before they enter info | |
| // Lets them know what to expect using this program | |
| // Puts line between message to user and prompt | |
| Console.WriteLine("\n"); | |
| // Prompts user to input total miles driven per day | |
| Console.WriteLine("Enter total miles driven per day : \n"); | |
| // Stores input given by user so it can be used in calculations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { // Message to user before they enter info | |
| // Lets them know what to expect using this program | |
| Console.WriteLine(@" | |
| **** WELCOME TO THE ODD OR EVEN TOOL **** | |
| ***************************************** | |
| Here you'll be asked to put in an integer | |
| as a whole number and we'll display if*** | |
| the value is odd or even!**************** | |
| ******** LETS GET STARTED! **************"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Prompts user to enter a number containing five digits | |
| Console.WriteLine("Please enter one number containing 5 digits (ex. 12345) :\n"); | |
| // Stores users input as a string | |
| String userString = Console.ReadLine(); | |
| // Takes users string and converts it to an integer | |
| int userNumbers= Convert.ToInt32(userString); | |
| // Takes the users integer and picks off each digit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Calc { public partial class Form1 : Form | |
| { | |
| // All variables set to be used in later code | |
| // Sets string to an empty string | |
| private string mathOperation = string.Empty; | |
| // Sets double to 0.0 | |
| private double leftOperand = 0.0; | |
| // Sets boolean to false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// Clean up any resources being used. | |
| /// </summary> | |
| /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |
| protected override void Dispose(bool disposing) | |
| { | |
| if (disposing && (components != null)) | |
| { | |
| components.Dispose(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// This program asks users a series of questions such as name, their trip destination, /// amount of miles driven, and amount of fuel used. With this information the program /// calculates their miles per gallon and lets the user know if their trip was /// economical and if their miles per gallon was very good/good/poor. | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace Economic { internal class Program { static void Main(string[] args) { // Line produces an output for user. // Describes the program and information needed from user. Console.WriteLine(@" ** WELCOME TO THE ECONOMIC TRIP CALCULATOR ** ** This program will help you determine how ** ** efficient and economical your trips are!*** ********** LETS GET STARTED! ***************"); |