Menu

Need Flowchart Code Int Main Main Method Printf N Twelcome Best Friend Dog Rescue Charity Q43885788

I need a Flowchart for this code:

    int main() {                                                                 // main method
      
       printf(“ntWelcome to the BestFriend Dog Rescue Charity Night at the Movies!”);
       printf(“nntTicket Sales forAdults:n”);
        int adult[6],child[4],expenses[5];                                            // decleration of arrays to store therespective price.
        int adult_total=0,child_total=0, expenses_total=0, charity=0, total_ticket=0; //variables to store the total respective prices.
        int i;
       for(i=1;i<=6;i++){                                                          // for loop to get the priceof adult tickets
       printf(“tAdult Ticket Price:$”);
       scanf(“%d”,&adult[i]);                                                       // storingthe user input to the respective array
       }
       for(i=1;i<=6;i++){                                                          // forloop to calculate the total.
      adult_total=adult_total+adult[i];
       }
       printf(“nntTotal Adult Ticketssales are $%d”, adult_total);                  // showingthe total.
      
      
       printf(“nntTicket Sales forChildren:n”);
       for(i=1;i<=4;i++){                                                          // for loop to get the priceof child tickets
       printf(“tChild Ticket Price:$”);
       scanf(“%d”,&child[i]);                                                       // storingthe user input to the respective array
       }
       for(i=1;i<=4;i++){                                                          // forloop to calculate the total.
      child_total=child_total+child[i];
       }
       printf(“nntTotal Child Ticketssales are $%d”, child_total);                  // showingthe total.
      
      
      
       printf(“nntSnackSales:n”);
       for(i=1;i<=5;i++){                                                          // for loop to get the priceof
       printf(“tSnack Prices: $”);
       scanf(“%d”,&expenses[i]);                                                   // storingthe user input to the respective array
       }
       for(i=1;i<=5;i++){                                                          // forloop to calculate the total.
      expenses_total=expenses_total+expenses[i];
       }
       printf(“nntTotal Snack sales are$%d”, expenses_total);                     // showing the total.
      
      
      
      total_ticket=adult_total+child_total+expenses_total;                         //calculating the total sales of tickets
       printf(“nntTotal Tickets Salesare $%d”,total_ticket);                     // showing the total sale.
      charity=total_ticket*0.45;                                                   //calculating the charity percentage as 45% i.e 0.45 of totalsale.
       printf(“ntThe Total donation forthe Charity Event is $%d”, charity);          // showing the charity
      
        return 0;
    }

Expert Answer


Answer to I need a Flowchart for this code: int main() { // main method printf(“ntWelcome to the Best Friend Dog Rescue Charity …

OR