Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,21 @@ class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
string name = "";
string ccn = "";
int exp = 0;
int cvv = 0;

Console.WriteLine("Please enter your full name as written on your credit card: ");
name = Console.ReadLine();
Console.WriteLine("Please enter your full credit card number, with no spaces or dashes: ");
ccn = Console.ReadLine();
Console.WriteLine("Please enter the expiration date of your card as a 6 digit number with no spaces: ");
exp = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter the 3-digit CVV number on the back of your card: ");
cvv = Convert.ToInt32(Console.ReadLine());

Console.WriteLine("Hello! My name is {0} and I'm a sucker. My credit card number is {1}. The expiration date is {2} and the CVV number is {3}.", name, ccn, exp, cvv);
}
}
}
12 changes: 12 additions & 0 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace csharp_workbook
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
9 changes: 9 additions & 0 deletions csharp-workbook.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RootNamespace>csharp_workbook</RootNamespace>
</PropertyGroup>

</Project>
77 changes: 77 additions & 0 deletions day2practice/HelloWorld.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{

// add 2 numbers, convert to int
// int x = 0;
// int y = 0;

// Console.WriteLine("give number");
// x = Convert.ToInt32(Console.ReadLine());

// Console.WriteLine("give 2nd number");
// y = Convert.ToInt32(Console.ReadLine());

// Console.WriteLine("{0} + {1} = {2}", x, y, x+y);




// converts yards to inches
// int yard = 12;
// int query = 0;

// Console.WriteLine("How many yards?");
// query = Convert.ToInt32(Console.ReadLine());
// Console.WriteLine("{0} yards is {1} inches", query, yard*query);



//bool people = true;
//bool f = false;

// decimal num = 0.23M;
// Console.WriteLine(num);



// string firstName = null;
// string lastName = null;
// var age = 0;
// string job = null;
// string favoriteBand = null;
// string favoriteVideoGame = null;

// Console.WriteLine("Whats your first name?");
// firstName = Console.ReadLine();
// Console.WriteLine("Whats your last name?");
// lastName = Console.ReadLine();
// Console.WriteLine("Whats your age?");
// age = Convert.ToInt32(Console.ReadLine());
// Console.WriteLine("Whats your job");
// job = Console.ReadLine();
// Console.WriteLine("Whats your favorite band?");
// favoriteBand = Console.ReadLine();
// Console.WriteLine("Whats your favorite video game?");
// favoriteVideoGame = Console.ReadLine();

// Console.WriteLine(
// "Your name is {0} {1}. You are {2} years old. You are a {3} for a living. {4} is your favorite band, even though it should be Guided By Voices. {5} is your favorite game.",
// firstName, lastName, age, job, favoriteBand, favoriteVideoGame);









}
}
}
8 changes: 8 additions & 0 deletions day2practice/HelloWorld.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>

</Project>
28 changes: 28 additions & 0 deletions practice2/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/practice2.dll",
"args": [],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
"console": "internalConsole",
"stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
,]
}
15 changes: 15 additions & 0 deletions practice2/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/practice2.csproj"
],
"problemMatcher": "$msCompile"
}
]
}
12 changes: 12 additions & 0 deletions practice2/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;

namespace practice2
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
8 changes: 8 additions & 0 deletions practice2/practice2.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

</Project>
Loading