Declare and initialize the following variables: int monthOfYear, initialized to the value 11 long companyRevenue, initialized to the value 5666777 int firstClassTicketPrice, initialized to the value 6000 long totalPopulation, initialized to the value 1222333.

Respuesta :

Answer:

Following are the declaration and the initialization of variable

int monthOfYear=11;  // variable declaration of integer

long companyRevenue=5666777; // variable declaration of long

int firstClassTicketPrice=6000;  // variable declaration of int

long totalPopulation=1222333; // variable declaration of long

Explanation:

Following are the description of Statement

  • Declare a variable " monthOfYear "  as integer type and initialized  11 to them .
  • Declare a variable " companyRevenue "  as long type and initialized  5666777 to them .
  • Declare a variable "  firstClassTicketPrice"  as integer type and initialized 6000 to them
  • Declare a variable " totalPopulation "  as Long type and initialized 1222333  to them .