mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-05 06:15:24 +00:00
Initial commit
This commit is contained in:
parent
34c95f7739
commit
fca52abf35
2 changed files with 8 additions and 12 deletions
|
|
@ -1,21 +1,19 @@
|
|||
using static System.Console;
|
||||
|
||||
int numberOfApples = 12;
|
||||
int numberOfApples = 12;
|
||||
decimal pricePerApple = 0.35M;
|
||||
|
||||
WriteLine(
|
||||
format: "{0} apples costs {1:C}",
|
||||
format: "{0} apples cost {1:C}",
|
||||
arg0: numberOfApples,
|
||||
arg1: pricePerApple * numberOfApples);
|
||||
|
||||
string formatted = string.Format(
|
||||
format: "{0} apples costs {1:C}",
|
||||
format: "{0} apples cost {1:C}",
|
||||
arg0: numberOfApples,
|
||||
arg1: pricePerApple * numberOfApples);
|
||||
|
||||
//WriteToFile(formatted); // writes the string into a file
|
||||
|
||||
WriteLine($"{numberOfApples} apples costs {pricePerApple * numberOfApples:C}");
|
||||
WriteLine($"{numberOfApples} apples cost {pricePerApple * numberOfApples:C}");
|
||||
|
||||
Write("Type your first name and press ENTER: ");
|
||||
string? firstName = ReadLine(); // nulls are expected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue