K-digital traning/C#프로그래밍
디아블로 아이템 사전
내꺼블로그
2023. 7. 19. 16:02
ex.
using System;
namespace HelloWorld
{
internal class Program
{
static void Main(string[] args)
{
string weaponName = "Hand Axe";
string weaponType = "Axe";
float dps = 3.2f;
int minDamage = 2;
int maxDamage = 3;
float aps = 1.3f;
Console.WriteLine(weaponName);
Console.WriteLine(weaponType);
Console.WriteLine(dps);
Console.WriteLine("Damage Per Second");
Console.WriteLine("{0}-{1} Damage", minDamage, maxDamage);
Console.WriteLine("{0} Attack per Second", aps);
}
}
}
1.
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string weaponName = "Simple Dagger";
string weaponType = "Dagger";
float dps = 6.0f;
int minDamage = 2;
int maxDamage = 6;
float attackSpeed = 1.50f;
Console.WriteLine(weaponName);
Console.WriteLine(weaponType);
Console.WriteLine("{0:0.0}", dps);
Console.WriteLine("Damage Per Second");
Console.WriteLine("{0}-{1} Damage", minDamage, maxDamage);
Console.WriteLine("{0:0.00} Attacks per Second", attackSpeed);
}
}
}
2.
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string weaponName = "Club";
string weaponType = "Mace";
float dps = 5.4f;
int minDamage = 3;
int maxDamage = 6;
float attackSpeed = 1.20f;
Console.WriteLine(weaponName);
Console.WriteLine(weaponType);
Console.WriteLine("{0:0.0}", dps);
Console.WriteLine("Damage Per Second");
Console.WriteLine("{0}-{1} Damage", minDamage, maxDamage);
Console.WriteLine("{0:0.00} Attacks per Second", attackSpeed);
}
}
}
3.
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string headArmorName = "Mystery Helm";
string headArmorType = "Helm";
string itemType = "Armor";
Console.WriteLine(headArmorName);
Console.WriteLine(headArmorType);
Console.WriteLine(itemType);
}
}
}
4.
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string handsArmorName = "Mystery Gloves";
string handsArmorType = "Gloves";
string itemType = "Armor";
Console.WriteLine(handsArmorName);
Console.WriteLine(handsArmorType);
Console.WriteLine(itemType);
}
}
}
5.
using System;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
string weaponName = "Short Bow";
string weaponType = "Bow";
float dps = 6.3f;
int minDamage = 1;
int maxDamage = 8;
float attackSpeed = 1.40f;
Console.WriteLine(weaponName);
Console.WriteLine(weaponType);
Console.WriteLine("{0:0.0}", dps);
Console.WriteLine("Damage Per Second");
Console.WriteLine("{0}-{1} Damage", minDamage, maxDamage);
Console.WriteLine("{0:0.00} Attacks per Second", attackSpeed);
}
}
}