Willsy Posted March 23, 2011 Share Posted March 23, 2011 I have an answer to this test in Basic and know it can be done. It is an interesting test for programmers in other languages, and is certainly suitable for c99 and Pascal. Here we go... If I write 7^2, that means SEVEN SQUARED, or put another way, SEVEN TO THE POWER OF TWO, also 7 * 7. Equally 7^3 is SEVEN TO THE POWER OF THREE or 7 * 7 * 7. Get the idea? OK. Your test is to write a program, in any language, which will determine the first power of seven which has a result containing six sevens in succession-eg "777777". Clue: The result has MORE than 15 digits! To make checking easy, your program should print the result: "SEVEN TO THE POWER OF N IS" where of course N is the first power that gives a result matching our requirements, and also of course giving the actual result. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.