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
35 changes: 29 additions & 6 deletions HelloWorld/HelloWorld.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
using System;

namespace HelloWorld
public class Program
{
class Program
public static void Main()
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
string name = "";
string lastname = "";
int age = 0;
int year = 7;
string band = "";
string team = "";


Console.WriteLine("Please enter your first name:");
// ReadLine enters the string
name = Console.ReadLine();
Console.WriteLine("Please enter your last name:");
lastname = Console.ReadLine();
Console.WriteLine("Please enter your age:");
// Convert.ToInt32 takes in the numbers
age = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Who is your favorite band:");
band = Console.ReadLine();
Console.WriteLine("What sports team do you cheer for:");
team = Console.ReadLine();


Console.WriteLine
(@"Hello! My name is {0} {1}.
I am {3} in dog years.
My favorite band is {4}.
I support {5}! ", name, lastname, age, year * age, band, team);
}
}
8 changes: 8 additions & 0 deletions HelloWorld1/HelloWorld1.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>
26 changes: 26 additions & 0 deletions HelloWorld1/Helloworld1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;

namespace HelloWorld1
{
class Program
{
static void Main(string[] args)
{
{
string name = "";
int age = 0;
int year = 0;

Console.WriteLine("Please enter your name: ");
name = Console.ReadLine();
Console.WriteLine("Please enter your age: ");
age = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Please enter the year: ");
year = Convert.ToInt32(Console.ReadLine());

Console.WriteLine("Hello! My name is {0} and I am {1} years old. I was born in {2}.", name, age, year-age);

}
}
}
}
23 changes: 23 additions & 0 deletions Quiz1/Quiz1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;

namespace Quiz1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("Do Console Line Notes!!!");
Console.WriteLine("Welcome Back!");
//use of the modules, be carefull using negatives
Console.WriteLine((7%(-3)));
Console.WriteLine((7%(3)));

int x = 7;
int y = 7;

Console.WriteLine(x++);
Console.WriteLine(++y);
}
}
}
8 changes: 8 additions & 0 deletions Quiz1/Quiz1.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>