Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
悲剧 搞了一下午 水的太水了 但要小心一点点 贴一下#include<stdio.h> #include<stdlib.h> int main() { float sl; int mw,ms; int a=0; scanf("%f %d %d",&sl,&mw,&ms); while(sl!=0.0&&mw!=0&&ms!=0) { { if(sl<=4.5 && mw>=150 && ms>=200) {a=1; printf("Wide Receiver ");} if(sl<=6.0 && mw>=300 && ms>=500) {a=1; printf("Lineman ");} if(sl<=5.0 && mw>=200 && ms>=300) {a=1; printf("Quarterback ");} } if(a==1) printf("\n"); else printf("No positions\n"); scanf("%f %d %d",&sl,&mw,&ms); a=0; } system("pause"); return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator