• Post Reply Bookmark Topic Watch Topic
  • New Topic

Repeat Code Using Loop  RSS feed

 
Heather Carey
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started a program on Friday and yesterday afternoon realized I was on the wrong path, so I had to start all over again.

Details: I'm creating a program that will display two instruments, viola and cello. It will display that they are playing, tuned, what strings are playing (by array) , and that the instrument stopped playing.
Results: My results are below. I need to make this whole program repeat 10 times.
Problem: I can't put a loop in the code to make it repeat 10 times because no matter where I start a loop my code is no longer compilable. I appreciate your time and any suggestions to point me in the right direction.

Thanks,
Heather

RESULTS
run:
The viola is now tuned
The viola is now playing
The strings that are playing are:
C
G
D
A
The viola has now stopped playing
The cello is now tuned
The cello is now playing
The strings that are playing are:
C
G
D
A
The cello has now stopped playing
BUILD SUCCESSFUL (total time: 1 second)



 
Heather Carey
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind. I used a While Loop. I don't know what I was doing before, but I was at my wits end.

Thanks anyways!!

Heather
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!