20일차: 세븐 세그먼트 디스플레이
                                            
                                                
                                                
                                                
                                                
                                                
                                                 7950 단어  100daysofcodejava
                    

public class Display {
    public static void main(String[] args) {
        Display pd = new Display();
            pd.setAssoc("5647");
    }
    public void setAssoc(String inputn) {
    String[][] nums = {
            { "+--+ ", "   + ", "+--+ ", "+--+ ", "+  + ", "+--+ ","+--+ ", "+--+ ", "+--+ ", "+--+ " },
            { "|  | ", "   | ", "   | ", "   | ", "|  | ", "|    ","   | ", "   | ", "|  | ", "|  | " },
            { "|  | ", "   | ", "   | ", "   | ", "|  | ", "|    ","   | ", "   | ", "|  | ", "|  | " },
            { "+  + ", "   + ", "+--+ ", "+--+ ", "+--+ ", "+--+ ","+--+ ", "   + ", "+--+ ", "+--+ " },
            { "|  | ", "   | ", "|    ", "   | ", "   | ", "   | ","|  | ", "   | ", "|  | ", "   | " },
            { "|  | ", "   | ", "|    ", "   | ", "   | ", "   | ","|  | ", "   | ", "|  | ", "   | " },
            { "+--+ ", "   + ", "+--+ ", "+--+ ", "   | ", "+--+ ","+--+ ", "   + ", "+--+ ", "+--+ " } };
              for (int i = 0; i < 7; i++) {
                  for (int j = 0; j < inputn.length(); j++) {
                           int index = inputn.charAt(j) - 48;
                           System.out.print(nums[i][index]);
                  }
               System.out.println();
              }
      }
}
Reference
이 문제에 관하여(20일차: 세븐 세그먼트 디스플레이), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://dev.to/mattryanmtl/day-20-seven-segment-display-53pn텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
                                
                                
                                
                                
                                
                                우수한 개발자 콘텐츠 발견에 전념
                                (Collection and Share based on the CC Protocol.)