zzzbel 2020-09-17 23:22 采纳率: 100%
浏览 54
已采纳

想要判断、筛选并输出符合条件的年龄,但是用Dev运行时没有任何内容,换用VS6.0则显示有error,求教

图片说明

原代码:
// 招聘者.cpp : Defines the entry point for the application.
//

#include
using namespace std;

int age()
{

int a;
cout<<"iInput:"< cin >> a;

if (a>=23 && a<=30)
cout<<"应聘者"<<a<<"岁,符合条件。"<<endl;
else
cout<<"应聘者"<<a<<"岁,不符合条件。"<<endl;
}

int main()
{
int age();
}

  • 写回答

1条回答 默认 最新

  • threenewbee 2020-09-17 23:48
    关注

    把main里面的int age();
    修改为
    age();

    或者是
    int n = age();

    问题解决的话,请点下采纳。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?