using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
//변수 정의(선언)
string itemName;
string category;
string subCategory;
float dps;
string dpsExplain;
int minDamage;
int maxDamage;
string dataCategory;
float attackSpeed;
string asExplain;
//변수에 값 할당
itemName = "WEATHERED HAND AXE";
category = "Axe";
subCategory = "1-Hand";
dps = 3.0f;
dpsExplain = "Damage Per Second";
minDamage = 2;
maxDamage = 3;
dataCategory = "Damage";
attackSpeed = 1.20f;
asExplain = "Attacks per Second";
//변수의 값 출력
Console.WriteLine(itemName);
Console.WriteLine(category);
Console.WriteLine(subCategory);
Console.WriteLine(dps);
Console.WriteLine(dpsExplain);
Console.WriteLine(minDamage);
Console.WriteLine(maxDamage);
Console.WriteLine(dataCategory);
Console.WriteLine(attackSpeed);
Console.WriteLine(asExplain);
}
}
}
코딩
소수점 .0은 왜 출력이 안됐을까?
'C# > 수업 내용' 카테고리의 다른 글
정보들 변수로 저장하고 출력 - 스타크래프트 오브젝트 (0) | 2021.12.23 |
---|---|
이틀째 수업중연습 Goliath정보 (0) | 2021.12.23 |
코딩연습 (0) | 2021.12.23 |
코딩방식1 (0) | 2021.12.23 |
첫수업 첫코딩 (0) | 2021.12.23 |