Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: How to compute the primitive root of a word

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Thanked 0 Times in 0 Posts

    Default How to compute the primitive root of a word

    For example,

    primitiveRoot("abc") => abc

    primitiveRoot("abcabc") => abc

    primitiveRoot("abcabcab") => abcabcab

    primitiveRoot("ababab") => ab

    Thank you!

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Eastern Florida
    Thanked 2,273 Times in 2,244 Posts

    Default Re: How to compute the primitive root of a word

    Do you have the rules for doing that? What is a "primitive root"?
    Without a set of rules, it is very hard to write a program.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. read a file word by word
    By poornima2806 in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: February 23rd, 2012, 02:14 PM
  2. Compute the average image value
    By IAmHere in forum Object Oriented Programming
    Replies: 3
    Last Post: January 16th, 2012, 11:07 PM
  3. Reading a text file word by word
    By dylanka in forum File I/O & Other I/O Streams
    Replies: 3
    Last Post: October 21st, 2011, 02:06 PM
  4. Program to compute powers
    By Shyamz1 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: October 25th, 2010, 04:51 PM
  5. calculator GUI needs to compute
    By javanovice in forum AWT / Java Swing
    Replies: 3
    Last Post: May 4th, 2010, 02:16 PM