Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

if Statements the best?

 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi- I'm working figuring out a way to do what the teachers told me to do...I still need a further hint:

I'm trying to Check how many of a particular name will fit on a line of max 80 characters (after already getting the length of the name) for Assignment 1B

all I can think of are a bunch of IF statements and maybe something with the % operator.

(thank you teachers for helping before and now.)
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about dividing the length of the line by the length of the name?
 
Nath Maniedeo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, I'm doing that...I've made some progress in trying things, I think I just need to figure out how to print the right thing now...I'll get back to you with a more defined question later if need be...thank you so much!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic