Created
November 24, 2015 01:53
-
-
Save swkwon/634766e2e8b08b9cebbc to your computer and use it in GitHub Desktop.
This file contains 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 ConsoleApplication1 | |
{ | |
class Program | |
{ | |
static void Test1() | |
{ | |
Console.WriteLine(">>Test 1"); | |
float a = 10.0f; | |
float b = 1.0f; | |
for (int i = 0; i < 10; i++) | |
{ | |
int c = (int)(a * b); | |
Console.WriteLine("{0} * {1} = {2}", a, b, c); | |
b += 0.1f; | |
} | |
Console.ReadKey(); | |
} | |
static void Test2() | |
{ | |
Console.WriteLine(">>Test 2"); | |
float a = 10.0f; | |
float b = 1.3f; | |
int c = (int)(a * b); | |
Console.WriteLine("{0} * {1} = {2}", a, b, c); | |
Console.ReadKey(); | |
} | |
static void Test3() | |
{ | |
Console.WriteLine(">>Test 3"); | |
float a = 10.0f; | |
float b = 1.8f; | |
int c = (int)(a * b); | |
Console.WriteLine("{0} * {1} = {2}", a, b, c); | |
Console.ReadKey(); | |
} | |
static void Test4() | |
{ | |
Console.WriteLine(">>Test 4"); | |
float a = 10.0f; | |
float b = 1.9f; | |
int c = (int)(a * b); | |
Console.WriteLine("{0} * {1} = {2}", a, b, c); | |
Console.ReadKey(); | |
} | |
static void Test5() | |
{ | |
Console.WriteLine(">>Test 5"); | |
float a = 10.0f; | |
float b = 1.6f; | |
int c = (int)(a * b); | |
Console.WriteLine("{0} * {1} = {2}", a, b, c); | |
Console.ReadKey(); | |
} | |
static void Main(string[] args) | |
{ | |
Test1(); | |
Test2(); | |
Test3(); | |
Test4(); | |
Test5(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment