앱 개발 개념

사전캠프 5일차 / 앱 개발 개념 과제 (조건문)

breadbro 2025. 2. 14. 17:42

import 'dart:io';

void main() {
  int score = int.parse(stdin.readLineSync()!);

  if (score >= 90) {
    print("A 학점");
  } else if (score >= 80) {
    print("B 학점");
  } else if (score >= 70) {
    print("C 학점");
      } else if (score >= 60) {
    print("D 학점");
      } else if (score < 60) {
    print("F 학점");
    
  }
  
}


import 'dart:io';

void main() {
  String day = stdin.readLineSync()!;

  switch (day) {
    case "월요일":
      print("한 주의 시작! 힘내세요!");
      break;
    case "금요일":
      print("주말이 곧 옵니다!");
      break;
    case "토요일":
    case "일요일":
      print("즐거운 주말 보내세요!");
      break;
    default:
      print("평범한 하루입니다.");
  }
}