?? example3.c
字號(hào):
#include <stdio.h>
void main()
{
char cont;
int marks, att_percent;
int count;
int no=1;
cont='y';
printf ("請(qǐng)輸入有幾門(mén)課程: ");
scanf("%d",&count);
while(cont == 'Y' || cont== 'y')
{
while (no<=count)
{
printf("\n請(qǐng)為該學(xué)員輸入第 %d 科的分?jǐn)?shù)和出勤率",no);
fflush(stdin);
printf("\n分?jǐn)?shù):");
scanf("%d",&marks);
printf("出勤率:");
scanf("%d",&att_percent);
if (att_percent >= 35 && marks >=35)
printf("通過(guò)");
else if (att_percent >= 35 && marks < 35)
printf("未通過(guò)");
else if (att_percent <=35 && marks <=35)
printf("未通過(guò)");
else if (att_percent <=35 && marks >=35)
printf("未通過(guò)");
else
printf("輸入值無(wú)效");
no++;
}
fflush(stdin);
printf ("\n繼續(xù) (Y/N):");
scanf("%c",&cont);
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -