int main()
{
int a = 8;
int b = 2;
int c = 1;
int dob = 0;
int* pdob = &dob;
int avg = 0;
int* pavg = &avg;
int min = 0;
int* pmin = &min;
int* pa = &a;
int* pb = &b;
int* pc = &c;
*pdob = (*pa) * (*pb) * (*pc);
cout <<"dob -> "<< *pdob << endl;
*pavg = *pa + *pb + *pc / 2;
cout <<"average -> "<< *pavg << endl;
if (*pb < min)
{
min = *pb;
}
if (*pc < min)
{
min = *pc;
}
cout <<"min -> "<< *pmin << endl;
}
我不明白为什么 0 是最小值,这在这里可能不正确。