int main()
{
	std::string months[] = {
		"January","February","March","April",
		"May","June","July","August",
		"September","October","November","December" 
	};
	
	printMonths(months);
	return 0;
}
Esempio n. 2
0
void graph(int months[]){
	int i;
  int j;
  //for every month of the year starting in december
  for(i=11;i>=0;i--){
  //    print out the month name
    printMonths(i+1);
    printf(" |");
  //    print the number of astericks == to number of people born in that month
    for(j=0;j<months[i];j++){
      printf("*");
    }
    printf("\n");
  }
}