某公园门票的票价是每人50元,一次购票满30张,每张可以少收2元。试编写自动计费系统程序。

#include<stdio.h>
int main()
{

int shu;
scanf("%d",&shu);
if(shu < 30)
{
printf("%d",50 * shu);

}
else
{
printf("%d",48 * shu);
}
return 0;

}