Question: I need help trying to fix this C program code. I cant get the highest and lowest value. I have attached the problem and the

I need help trying to fix this C program code. I cant get the highest and lowest value. I have attached the problem and the code.
this it the code:
#define _CRT_SECURE_NO_WARNINGS //for Visual Studio compiler
#pragma warning(disable:6031)//ignore scanf warnings
#include //for printf and scanf
//Prototypes
//void HighAndLowPTR(int high, int low);
void HighAndLow(double *highPtr, double *lowPtr, int count);
int main()
{
// Declaration
int count;
double high, low;
printf("Enter the count: ");
scanf("%d", &count);
HighAndLow(&high, &low, count);
printf("The Highest is %.1lf, and the lowest is %.1lf", high, low);
}
// Function Definition
void HighAndLow(double *highPtr, double *lowPtr, int count)
{
//int count;
//double *highPtr,*lowPtr;
double temp, high, low;
int i;
for (i =1; i = count; count--)
{
printf("Enter a double: ");
scanf("%lf", &temp);
if (temp >*highPtr)
{
*highPtr = temp;
*lowPtr = temp;
//*highPtr = temp;
}
else if (temp *lowPtr)
{
*lowPtr = temp;
}
}
}
 I need help trying to fix this C program code. I

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!