📄 taxes.c
字号:
#include <stdio.h>
#include <stdlib.h>
void main()
{
int tax1, tax2;
char height[4],temp[4],favnum[5];
printf("Enter your height in inches:");
gets(height);
printf("What temperature is it outside?");
gets(temp);
printf("Enter your favorite number:");
gets(favnum);
tax1=atoi(height)*atoi(favnum);
tax2=atoi(temp)*atoi(favnum);
if(tax1>tax2)
{
printf("You owe $%i in taxes.\n",tax1*10);
}
else
{
printf("You owe $%i in taxes.\n",tax2*10);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -