Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Bitcoins expectative :'v
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { float val = 2000000; float val_i = val; for(int i = 0; i < 30; i++) { val = val * 1.03f; Console.WriteLine("Day " + i + ": $" + val); } Console.WriteLine("Total earned in 30 days: $" + (val - val_i)); Console.WriteLine("%" + (((val - val_i) / val_i) * 100) + " from the initial investment: $" + val_i); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Operator Overloading Example (+, -, *, /, ==, !=)
Hello
SortedDictionary : Add と foreach
bubble sort
Selection sort
Evaluating a Mathematical expression in a string in C#
Ex03 cm=ft,in
Teabag
PayU Lu c#
saved
stackse - search stackoverflow differently
Please log in to post a comment.