The Naked Scientists

The Naked Scientists Forum

Author Topic: create programs for song words  (Read 11309 times)

Offline LeeE

  • Neilep Level Member
  • ******
  • Posts: 3382
    • View Profile
    • Spatial
create programs for song words
« Reply #25 on: 23/02/2009 20:46:01 »
 ;D
 

Offline Chemistry4me

  • Neilep Level Member
  • ******
  • Posts: 7709
    • View Profile
create programs for song words
« Reply #26 on: 24/02/2009 07:39:45 »
if(minutes == 0) rock(hour);

static void rock(int hr) {
  if(hr == 1 ) {
    printf("Put your glad rags on and join me, hon");
  } else if((hr >= 2) && (hr <= 4)) {
    if(band_speed < prev_band_speed) {
      printf("yell for more");
    }
  } else if((hr >= 5) && (hr <= 7)) {
    printf("We'll be right in seventh heaven")
  } else if((hr >= 8) && (hr <= 11)) {
    printf("I'll be goin'' strong and so will you");
  } else if(hr == 12) {
    cool_off();
  }
}

There are probably quite a few syntax errors in there - lol - it's been a while since I did any coding and I may have mixed C & C++ syntax incorrectly with other languages I've used (where's the syntax checker when you need it?)

And no, I'm not going to code the function cool_off() - it's too subjective  ;)

P.S.  Oops - just realised that I'm not passing band_speed and prev_band_speed to the func
You might as well be speaking Mongolian for all I know! :o:o ?????????
 

Offline DoctorBeaver

  • Naked Science Forum GOD!
  • *******
  • Posts: 12656
  • Thanked: 3 times
  • A stitch in time would have confused Einstein.
    • View Profile
create programs for song words
« Reply #27 on: 24/02/2009 10:19:57 »
Mongolian doesn't have so many consonants  :D
 

Offline Chemistry4me

  • Neilep Level Member
  • ******
  • Posts: 7709
    • View Profile
create programs for song words
« Reply #28 on: 25/02/2009 04:31:14 »
Ah... well, there you are, thank you for proving my point!
 

The Naked Scientists Forum

create programs for song words
« Reply #28 on: 25/02/2009 04:31:14 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums