我正在尝试使用多个函数编写代码,这些函数只会让员工错过我尝试使用全局标识符的公司的平均天数 这是我的代码
#include<iostream>
using namespace std;
int days;
int numberemployees;
int main()
{
int days;
int numberemployees;
double average;
cout<<"How many employees do you have";
cin>>numberemployees;
daysmissed;
averagedays;
return 0;
}
int daysmissed(int)
{
int days;
cout<<"How many total days where missed by employees this year";
cin>>days;
return days;
}
double averagedays(double)
{
double average;
average=days/numberemployees;
return average;
}