w1052833104 2016-01-05 15:03 采纳率: 0%
浏览 1455

我的C语言基础入门时编写一个代码,出现问题,希望得到求解。

它提示我说的
--------------------Configuration: one - Win32 Debug--------------------
Compiling...
one.c
D:\C语言\MSDev98\MyProjects\one\one.c(12) : error C2065: 'FebSold' : undeclared identifier
D:\C语言\MSDev98\MyProjects\one\one.c(12) : error C2065: 'MarSold' : undeclared identifier
执行 cl.exe 时出错.

one.obj - 1 error(s), 0 warning(s)


他的原代码是
#include

int main(void)
{
const float Revenue_Per_150 = 4.5f;
short JanSold = 23500; // Stock sold in January
short FebSlod = 19300; // Stock sold in February
short MarSlod = 21600; // Stock sold in March
float RevQuarter = 0.0f; // Sales for the quarter

short QuarterSold = JanSold + FebSold + MarSold;    // Calculate quarterly total

// Output minthly sales and total for the quarter
printf("Stock sold in\nJan:%d\nFeb:%d\n",JanSold,FebSold,MarSold);
printf("Total stock sold in first quarter:%d\n",QuarterSold);

// Calculate the total recenue for the quarter and output it 
printf("Sales recenue this quarter is:$%.2f\n",RevQuarter);
return 0;

}


希望的到求解,谢谢。

  • 写回答

4条回答 默认 最新

  • threenewbee 2016-01-05 15:06
    关注

    你上面
    FebSlod
    你下面
    FebSold
    有一个拼错了

    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘