PAT:分支-08. 高速公路超速处罚(15) AC

#include<stdio.h>
int main()
{
  int s,l;
  double rate;
  scanf("%d%d",&s,&l);
  rate=(double)(s-l)/l*100;
  if(rate<10)
    printf("OK\n");
  else if(rate<50)
    printf("Exceed %2.0lf%%. Ticket 200\n",rate);
  else
    printf("Exceed %2.0lf%%. License Revoked\n",rate);
  return 0;
}
posted on 2015-02-13 17:16  Evence  阅读(204)  评论(0编辑  收藏  举报