분류 전체보기78 [프로그래머스C#]leve1 문자열을 정수로 바꾸기 using System; using System.Collections.Generic; using System.Globalization; public class Solution { public int solution(string s) { int answer = 0; if(s.Length>=1&&s.Length 2020. 7. 13. [프로그래머스 level1]가운데 글자 가져오기 c# public class Solution { public string solution(string s) { string answer = ""; if(s.Length%2==0) { answer=s.Substring((s.Length/2)-1,2); }else { answer=s.Substring(s.Length/2,1); } return answer; } } 2020. 7. 3. [프로그래머스 leve1] 수박수박수 c# public class Solution { public string solution(int n) { string answer = ""; for(int i=0;i if(i%2==0) answer=answer.Insert(i,"수"); else answer=answer.Insert(i,"박"); } return answer; } } 2020. 7. 3. [아두이노] 메세지 출력, LED void setup() 함수: 코드실행시 맨 처음 한 번만 실행함 ex)하드웨어를 초기화 시키는 부분 void loop() 함수: 무한 반복 Serial.begin(): PC로 메세지를 보낼 때 데이터의 속도를 설정하는 함수 ex)300,600,9600,14400,115200... Serial.println():PC로 메세지를 보내는 함수-> 시리얼 모니터에서 확인 가능 Serial.println()으로 실수를 보낼시 소수점 아래 두번째 까지만 출력함 ex)1.234----->1.2 void setup() { //코드 실행시 한 번 만 실행함! 하드웨어를 초기화 시키는 부분 Serial.begin(115200); Serial.println("Hello! PC^^,I am Arduino"); Serial... 2020. 6. 29. 이전 1 ··· 10 11 12 13 14 15 16 ··· 20 다음