20200803给出一 名学生的语文和数学成绩,判断他是否恰好有一门课不及格(<60分),如果是输出1;否则输出0(奥赛一本通 p32 10)

# include<bits/stdc++.h>
using namespace std;
int main()
{  int yy=0,sx=0;

   cout<<"语文成绩:";
   cin>>yy;
   cout<<"数学成绩:";
   cin>>sx;
   if(yy>=60&&sx<60)

     {cout<<1<<endl;

   }

   else

   if(yy<60&&sx>=60)

     {cout<<1<<endl;

   }
   else
     {cout<<0<<endl;}
}

原文地址:https://www.cnblogs.com/whcsrj/p/13424296.html