Greetings:

I have been struggling to clear this error I have in my code, but I cannot for the life of me find it.

Error: End of File detected before Left Brace

Attached is my code, appreciate any help.

#include <stdio.h>
#define SIZE 20

int i, j; 
int temp[SIZE], pressure[SIZE];
int loopCount; 

int main()

{
    for (i = 0; i < SIZE; i++)
    {
        loopCount = 0;
    }

        printf("Please input your 20 values for Temperature:\n", (i+1));
        scanf_s("%d\n", &temp[i]);

        if ((temp[i] > 0) && (temp[i] < 20))

        {
                        loopCount += 1;
        }
        else{
            printf("\nInvalid entry, please continue to enter your Temperature's and Pressure's up to 20.");
        }
    for (j = 0; j < SIZE; j++)
    {
        loopCount = 0;
    {
        printf("Please input your 20 values for Pressure:\n", (j+1));
        scanf_s("%d\n", &pressure[j]);

        if ((pressure[j] > 0) && (pressure[j] < 20))
        {
            loopCount += 1;
        }
        else{
            printf("\nInvalid entry, please continue to enter your Temperature's and Pressure's up to 20.");
        }

        if ((temp[i] >= 212) || (pressure[j] >= 450))
        {
            printf("Extreme Temperature:", temp[i]);
        }

        else{
            printf("Extreme Pressure:", pressure[j]);
        }

        void Output(int tempFinal, int pressureFinal);
        {
            printf("\nTemperature: %d    Pressure: %d\n, tempFinal, pressureFinal");

            getchar();
            return 0;
}

In line 51, you declare the prototype for a function, but I think you actually do not need lines 51 and 52. They look like they are getting in the way, so remove those two lines and see what happens.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.