Archived
For what age will the following code return "It's free"?
int main()
    {    
        float price = 0;
        switch (age)
        {
            case >=9 && <15 :
                   price = 6;
            break;
            case > 15 && <25:
                   price = 9;
            break;
            case > 25 && <60:
                price = 12.70;
            break;
            default :
                price = 0;
                printf(“It's free”);
             break;
        }
            printf(“You owe %ld euros”,price);
            return 0;
    }
0
Community EvaluationsNo one has reviewed this question yet, be the first!
2
Write a C program to calculate the total number of sweets.3
Write a C program that calculates the average of two notes.8
What is the size of a long long in C++?2
Write a C function to swap two integers.5
Undefined behavior.1
What does the following code refer to:  C:\ProgramFiles\QtCreator\text.txt ? 4
Find the sum of all even numbers in an array in C