Home > Back-end >  A: why can't I run? (ignoring aver is a problem of integer)
A: why can't I run? (ignoring aver is a problem of integer)

Time:06-10

#include

Int main ()
{
Int n1, n2 and n3, aver, I;
Printf (" please enter educational n1, n2, n3: ");
The scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);
I=n1 & lt; 60 | | n2 & lt; 60 | | n3 & lt; 60;
The switch (I)
{
Case 1: printf (" no assessment of qualifications "); break;
Case 0:
Aver=(n1 + n2 and n3)/3;
I=aver/10;
The switch (I)
{
Case 9:
Printf (" grade a ");
break;
Case 8:
Printf (" b ");
break;
Case 7:
Printf (" c ");
break;
Case 6:
Printf (" evaluation of unqualified ");
break;
}
}
return 0;
}

CodePudding user response:

You need to: CSDN BBS newbie guide

CodePudding user response:

 # include 

Int main ()
{
Int n1, n2 and n3, aver, I;
Printf (" please enter educational n1, n2, n3: ");
The scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);
//I=n1 & lt; 60 | | n2 & lt; 60 | | n3 & lt; 60;
If (n1 & lt; 60 & amp; & N2 & lt; 60 & amp; & N3 & lt; 60)
I=1;
The else
i=0;
The switch (I)
{
Case 1:
Printf (" no assessment of qualifications "); break;
Case 0:
Aver=(n1 + n2 and n3)/3;
I=aver/10;
The switch (I)
{
Case 9:
Printf (" grade a \ n ");
break;
Case 8:
Printf (" b etc. \ n ");
break;
Case 7:
Printf (" c, etc. \ n ");
break;

Default:
//case 6:
Printf (" evaluation of unqualified \ n ");
break;
}
}
return 0;
}

For your reference ~

CodePudding user response:

Case 1: printf (" no assessment of qualifications "); break;//the colon is in Chinese, use English colon
Case 0://to the colon in English

Case 1:
Printf (" no assessment of qualifications ");
break;
case 0:

CodePudding user response:

The scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);
=============="
The scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);

CodePudding user response:

Is indeed a colon problem, but I want to know, mobile phones can enter the colon in both English and Chinese, the computer input, it will also tell the colon in both English and Chinese?

CodePudding user response:

references in 4th floor, the truth is more important than right or wrong response:
the scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);
=============="
The scanf (" % d % d % d ", & amp; N1, & amp; N2, & amp; N3);

This space without much impact

CodePudding user response:

Computers, of course, also have Chinese and English of the colon, not the same,
reference 5 floor qq_45814010 reply:
is indeed a colon problem, but I want to know, mobile phones can enter the colon in both English and Chinese, the computer input, it will also tell the colon in both English and Chinese?

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related