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