7-76
#include <stdio.h>
int main(){
int a,b;
float M;
char c;
scanf("%d %d %c",&a,&b,&c);
switch(b)
{
case 90:M=a*6.95;break;
case 93:M=a*7.44;break;
case 97:M=a*7.93;break;
}
switch(c)
{
case 'm':M=M*0.95;break;
case 'e':M=M*0.97;break;
}
printf("%.2f",M);
return 0;
}
7-77
#include <stdio.h>
int main(){
int a,b,c,d;
scanf("%d %d",&a,&b);
if(a<b*1.1)
printf("OK\n");
else if(a>=b*1.1&&a<b*1.5){
c=(a*1.0/b-1)*100;
printf("Exceed %d%%. Ticket 200\n",c);
}
else if(a>=b*1.5)
{
d=(a*1.0/b-1)*100;
printf("Exceed %d%%. License Revoked\n",d);
}
return 0;
}
7-10
#include <stdio.h>
#include <math.h>
int mian(){
double m,y,r,b;
scanf("%lf %lf %lf",&m,&y,&r);
b=pow(1+r,y);
printf("interest = %.2f",m*b-m);
return 0;
}
7-16
#include <stdio.h>
int main(){
printf("I\n");
printf(" \n");
printf("L\n");
printf("o\n");
printf("v\n");
printf("e\n");
printf(" \n");
printf("G\n");
printf("p\n");
printf("L\n");
printf("T");
return 0;
}