我正在参加编程课程的介绍.我们不必编写实际的代码,但如果我们这样做,我们会得到额外的信任.我们使用Raptor作为流程图,您可以从那里生成C++代码,并通过一些修改获得工作代码.我使用Visual Studio 2008进行代码mod和构建.对于期中考试,我有停车问题.这些评论解释了程序的功能,除了一个错误之外它构建得很好:我收到一条消息,说第70行找不到'ceiling'标识符.这是代码:
// midterm part 2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
void getTime (float &time);
void getAge (int &age);
void calcFee (float time, double &fee);
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
double discount;
double fee;
float time;
int age;
cout << "This program gets the amount of time parked and calculates the total fee for parking." <<endl;
cout << "The rate is $1.00 for the …Run Code Online (Sandbox Code Playgroud)