- 결과 화면을 참고하여 점수를 입력 받아 해당 정보들을 계산 후 출력해주는 프로그램 작성


- 점수가 -1보다 작거나 100보다 큰 경우 메시지 출력 후 다시 입력을 받음


점수가 -1일 경우 입력 종료


- 80점 미만의 점수는 불합격 (fail) 처리


- 점수 별 학생 수 분포는 정렬하여 출력


- 평균은 소수점 아래 2자리까지 출력


-switch (#1) if (#2)를 사용하여 작성


-Using the result page, input the score and calculate the information and print it program.


-If score less than -1 or higher than 100 print message and again input, if score = -1 exit.


-Less 80 , fail


-Setprecision(2).


 

이런 화면을 출력하는건데요.


#include <iostream>
#include <iomanip>
using namespace std;

class Grade{
public:
 void inputGrade(){
  cout << "점수를 입력하세요 <입력 종료는 -1> : ";
  int Grade=0;
  cin >> Grade;
 while(Grade!=-1)

switch(Grade){
   case 100:
    GradeCount1++;
    break;
  

   case 90:
   case 91:
   case 92:
   case 93:
   case 94:
   case 95:
   case 96:
   case 97:
   case 98:
   case 99:
    GradeCount2++;
    break;


이렇게 입력을 계속 할수는 없잖아요ㅠㅠㅠ

범위를 지정을 해야하는데 스위치문은 숫자랑 문자하나만 입력이 가능하다고 배웠는데

if문을 어떻게 써야할 지도 모르겠고 미치겠네요