W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
int main() { // 创建不同数据类型的变量 int items = 50; float cost_per_item = 9.99; float total_cost = items * cost_per_item; char currency = '$'; // 打印变量值 printf("商品数量: %d\n", items); printf("单价: %.2f %c\n", cost_per_item, currency); printf("总价: %.2f %c\n", total_cost, currency); return 0; }