• Post Reply Bookmark Topic Watch Topic
  • New Topic

segment A and segments B  RSS feed

 
Vital Jays
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The positive numbers A and B (A> B) are given. The maximum possible number of segments of length B (without overlays) is placed on the segment of length A . The  task is following: without using the operations of multiplication and division, to  find  the length of the unoccupied part of the segment A and the number of segments B placed on the segment A.

I  did  the  task  in  such a  way:

I am not sure whether I correctly found the length of the unoccupied part of the segment A. Could  anybody help me with  this?
Many, many thanks  in  advance.
 
Tim Cooke
Marshal
Posts: 4051
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This, and the last few threads of yours, look like homework or at least a sequence of questions from a book or tutorial. For the purposes of copyright could you please add the correct attribution to your post by quoting the source of the questions?
 
Liutauras Vilda
Sheriff
Posts: 4927
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vital Jays wrote:I am not sure whether I correctly found the length of the unoccupied part of the segment A.

We can't say whether you found correctly or not as you didn't do that at all yet.

What you found is (I assume you did that correctly, but to answer that, you need to test it and prove it to yourself whether it is true or not) :
the number of segments B placed on the segment A

 
Vital Jays
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to Tim Cooke
I  would  write  the  source  with  great  pleasure,  but unforunately I can't  to  do  that cause all of  these  tasks are in the  PowerPoint presentation and  written in Russian,  so tasks  that  I  want  to  post on the forum  I translate into English.

to Liutauras Vilda
the  compiler shows such  result:


And  I  assume  that  something is  wrong with  that. The  length of the unoccupied part of the segment A should  have one  number, but  not  five.
 
Tim Cooke
Marshal
Posts: 4051
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where did the powerpoint come from? Is it a school assignment?
 
Vital Jays
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Cooke wrote:Where did the powerpoint come from? Is it a school assignment?

yep,  so  to  say
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!