|
|
|
 |
|
제어문
조건에 따라 분기하는 if, if~else 및 switch 문의 사용법을 학습한다.
특정 문장을 반복적으로 수행하는 for, while, do~while 문의 사용법을 학습한다.
목차
1. 제어문의 개념
2. if 문
3. if~else 문
4. 다중 if~else 문
5. switch 문
6. 지정된 횟수만큼 반복하는 for 문
7. 조건을 먼저 검사하는 while 문
8. 조건을 나중에 검색하는 do~while 문
01. 제어문
02. if 문
형식 문장 1; .. |
|
|
|
|
|
 |
|
◆ logic1
1.소스
library ieee;
use ieee.std_logic_1164.all;
entity logic1 is
port(a,b,c :in bit;
y :out bit);
end logic1;
architecture sample of logic1 is
signal w, x : bit;
begin
no1: process(a,b)
begin
if (a= 1 ) or (b= 1 ) then w [= 1 ;
else w [= 0 ;
end if;
end process;
no2: process(b,c)
begin
if (b= 0 ) or (c= 0 ) then x [= 1 ;
else x [= 0 ;
end if;
end.. |
|
|
|
|
|
 |
|
과목명
고급프로그래밍및실험
분반
담당교수
학과
전자통신공학과
학번
이름
공약수와 최대 공약수 출력하기
1, 과제설명
첫 번째 consol화면은 조건문인 if문과 반복문인 for문을 이용하여 공통된 약수를 구할 두 수를 입력받으면 공약수들이 화면에 출력되게 프로그램을 짜보는 것이고 두 번째 consol화면은 위와 마찬가지로 공통된 약수를 구할 두 수를 입력받으면 공약수들 중에서 최대 공약수만 .. |
|
|
|
|
|
 |
|
모든 기계 및 설비는 최종적으로 바깥부분에 Cover를 제작하여 덮어주게된다. 그런데 이 cover란 것이 단순하면서도 설계에 시간이 많이 걸리는 귀찮은 일중의 하나라 하겠다. 이프로그램은 이러한 cover제작에 필요한 도면을 1분도 안 걸리는 시간에 그려주는 프로그램이다.
캐드 비숙련자가 사용하려면
command에서 appload를 치고 본 프로그램을 저장한 곳에 가서 선택하여 load시킨 후
command에서 c.. |
|
|
|
|
|
 |
|
Lille Tissages, S.A.
2
Agenda
Basic Case Analysis
Questions Solving
Q1. Should Lille Tissages lower the price to FF15
Q2. If the department that produces Item 345 was a profit center and if you were the manager of that department, would it be to your financial advantage to lower the price
Q3. Is there any possibility that competition might raise their prices if Lille Tissages.. |
|
|
|
|
|
 |
|
Console.WriteLine("5. 종료");
mPlayer.Attack(monster);
Console.WriteLine("===전투=== ");
Console.WriteLine();
Console.WriteLine("1. 공격");
Console.WriteLine("3.도망");
monster.Attack(mPlayer);
if(!mPlayer. IsA ive())
텍스트RPG 게임만들기
Class Player
C#텍스트RPG 만들기
텍스트RPG
여관가기 구현
주석해제
메인 루프에서 커맨드 enum으로 변경
Console.Write("플레이어의 이름을 입력하.. |
|
 |
console, writeline, 입력, 이름, 골드, 경험치, monster, 플레이어, if, 력, 출력, mplayer, command, tostring, 커맨드, 텍스트, true, 구현, enum, mexp |
|
|
|
|
 |
|
Console.WriteLine("5. 종료");
mPlayer.Attack(monster);
Console.WriteLine("===전투=== ");
Console.WriteLine();
Console.WriteLine("1. 공격");
Console.WriteLine("3.도망");
monster.Attack(mPlayer);
if(!mPlayer. IsA ive())
텍스트RPG 게임만들기
Class Player
C#텍스트RPG 만들기
텍스트RPG
여관가기 구현
주석해제
메인 루프에서 커맨드 enum으로 변경
Console.Write("플레이어의 이름을 입력하.. |
|
 |
console, writeline, 입력, 이름, 골드, 경험치, monster, 플레이어, if, 력, 출력, mplayer, command, tostring, 커맨드, 텍스트, true, 구현, enum, mexp |
|
|
|
|
 |
|
상업송장입니다.
①Seller
②Consignee
③Departure date
④Vessel/flight
⑤From
⑥To
⑦Invoice No. and date
⑧L/C No. and date
⑨Buyer(if other than consignee)
⑩ Shipping Marks
⑪ Goods description |
|
|
|
|
|
 |
|
Console.WriteLine("1.전투 시작");
Console.WriteLine("2.상점");
Console.WriteLine("4. 종료");
Console.WriteLine("게임 종료");
Console.WriteLine("===전투=== ");
Console.WriteLine();
Console.WriteLine("1. 공격");
Console.WriteLine("3.도망");
텍스트RPG 게임만들기
C#텍스트RPG 만들기
Class Gam eController
MainLoop에 추가
오류나는 부분m bExit 수정
MainLoop 실행작성
코드 형태만 달라.. |
|
 |
console, writeline, hp, tostring, 입력, mname, 이름, 플레이어, string, at, form, 체력, 력, 부분, mplayer, if, 작성, gam, econtroller, mhp |
|
|
|
|
 |
|
Console.WriteLine("1.전투 시작");
Console.WriteLine("2.상점");
Console.WriteLine("4. 종료");
Console.WriteLine("게임 종료");
Console.WriteLine("===전투=== ");
Console.WriteLine();
Console.WriteLine("1. 공격");
Console.WriteLine("3.도망");
텍스트RPG 게임만들기
C#텍스트RPG 만들기
Class Gam eController
MainLoop에 추가
오류나는 부분m bExit 수정
MainLoop 실행작성
코드 형태만 달라.. |
|
 |
console, writeline, hp, tostring, 입력, mname, 이름, 플레이어, string, at, form, 체력, 력, 부분, mplayer, if, 작성, gam, econtroller, mhp |
|
|
|
|
 |
|
PACKING LIST
①Seller
⑦Invoice No. and date
②Consignee
⑧Buyer(if other than consignee)
⑨Other references
③Departure date
④Vessel/flight
⑤From
⑥To
⑩Shipping Marks
⑪No. kind of packages
.... |
|
|
|
|
|
 |
|
COMMERCIAL INVOICE
①Seller
⑦Invoice No. and date
⑧L/C No. and date
②Consignee
⑨Buyer(if other than consignee)
Other references
③Departure date
④Vessel/flight ⑤From
Terms of delivery and payment
.... |
|
|
|
|
|
 |
|
프로그램 흐름을 조건에 따라 실행시키는 게 조건 문입니다.
if 조건 문 실습
조건이 참일 경우 실행되는 코드
조건 문 실습
중첩 조건 문 실습
Switch문
switch문에 대해 배워보도록 하겠습니다.
Switch문 실습1
이처럼 조건문이란 주어진 조건식의 결과에 따라 다른 명령을 수행하도록 프로그램의 흐름을 제어하는 명령문을 의미합니다.
프로그램 흐름을 조건에 따라 실행시키는 게 조건 문입니다.
If(조.. |
|
 |
조건, 문, 따르다, a, 실행, 입력, 받다, 개, 보다, switch, 달, 조건식, c, 이다, 프로그램, b, 결과, 흐름, 사용, if |
|
|
|
|
 |
|
프로그램 흐름을 조건에 따라 실행시키는 게 조건 문입니다.
if 조건 문 실습
조건이 참일 경우 실행되는 코드
조건 문 실습
중첩 조건 문 실습
Switch문
switch문에 대해 배워보도록 하겠습니다.
Switch문 실습1
이처럼 조건문이란 주어진 조건식의 결과에 따라 다른 명령을 수행하도록 프로그램의 흐름을 제어하는 명령문을 의미합니다.
프로그램 흐름을 조건에 따라 실행시키는 게 조건 문입니다.
If(조.. |
|
 |
조건, 문, 따르다, a, 실행, 입력, 받다, 개, 보다, switch, 달, 조건식, c, 이다, 프로그램, b, 결과, 흐름, 사용, if |
|
|
|
|
 |
|
1.원문
One Inch Tall
If you were only one inch tall, you'd ride a worm to school.
The teardrop of a crying ant would be your swimming pool.
A crumb of cake would be a feast
And last you seven days at least.
A flea would be a frightening beast
If you were one inch tall.
If you were only one inch tall, you'd walk beneath the door,
And it would take about a month to get down .. |
|
|
|
|
|
|
|