electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

what is the final digit in the number 947^362?


Post new topic  Reply to topic    EDAboard.com Forum Index -> Mathematics & Physics -> what is the final digit in the number 947^362?
Author Message
giogiogio



Joined: 09 Sep 2009
Posts: 1
Location: philippines


Post20 Sep 2009 12:16   

what is the final digit in the number 947^362?


what is the final digit in the number 947^362? can u help me to figure this out I need the complete solution.
Back to top
Google
AdSense
Google Adsense




Post20 Sep 2009 12:16   

Ads




Back to top
Kripton2035



Joined: 19 Jul 2001
Posts: 587
Helped: 20
Location: Earth


Post20 Sep 2009 16:29   

what is the final digit in the number 947^362?


947^362 =
2745948571821074460117767511934525623726695390994942893853121271175569
2465869164672059839447465232567749040956518321177110373301273250840811
2833576548938705845289303982469204071419423154726009794296598262151457
5805255298107990324477012167443353221465694707732964724055931317413352
3977508874048568177249527388724549428189316385068306627993235825384643
4605166354084510840993960693590363260534637008247370877455431219927028
7283747300637937030356081548764186164018595629421251358385328366972959
0539430090502856908734081505205753287618596176092620740657108667904131
9427776263400061760544306892710725961320778167789296982889630303774891
6652019897911955604736755415063659485033743677683180319734067055832775
2653895793616047835799553253094320821137730305771270108974068452324697
9477551329540959272832636540241228987837401618443156268443740181839551
3207763680744362876615481314073479406202673595802383950198315275514118
5146286408155598211350956077591863372420988162173276760508144457086752
3698644910324530570673654179761746935303832222176370690187576004103826
1230290077981863656261873609

so you have your last digit ...
Back to top
M!k



Joined: 22 Apr 2002
Posts: 871
Helped: 79


Post21 Sep 2009 0:25   

Re: what is the final digit in the number 947^362?


OK, here're your homeworks:
you can use the proggi below to calculate the last digit.
The trick is this: if you just wanted to know the last digit, your calculation can also be reduced to the last digit. So we won't calculate 947^362, but 7^362.
Calculating the power means multiplying the basis with itself exponent times.
So the sequence would be:
7^1 = 7
7^2 = 49
7^3 = 343
7^4 = 2401
7^5 = 16807
7^6 = 117649
.
.
.
7^362 = a very big number

As that very big number (requires special libraries) is not interesting we can again reduce the result of each multiplication to the last digit.
So the sequence is like that (compare to the last digit of sequence above):
1 * 7 = 7 --> 7
7 * 7 = 49 --> 9
9 * 7 = 63 --> 3
3 * 7 = 21 --> 1
1 * 7 = 7 --> 7
7 * 7 = 49 --> 9
.... (repeat 362 times in total) --> Result: 9

Btw. you'll recognize that the sequence of the last digit is always: 7 9 3 1
So you can also calculate 362 / 4 = 90.5. The result after 0.5 of this sequence is 9

Code:
void main(void)
{
   unsigned int basis;
   unsigned int exponent;
   unsigned char lastdigit;
   unsigned int counter;


   basis = 947;
   exponent = 362;
   printf("\nCalculating the last digit of: %d^%d\n", basis, exponent);
   basis = lastdigit = basis % 10;                                 // reduce to last digit, e.g. 947 --> 7
   for(counter = 2; counter <= exponent; counter++)
   {
      lastdigit = lastdigit * basis;
      lastdigit = lastdigit % 10;                                 // reduce result to last digit
//      printf("\nExponent: %d  Last Digit: %d", counter, lastdigit);
//      getch();
   }
   printf("\n\nResult: %d\n", lastdigit);
}
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Mathematics & Physics -> what is the final digit in the number 947^362?
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
What is the seed number in random number generation? (2)
In sigma delta PLL, what decide the number of the acc's bit? (2)
What is the difference between these number of cadence? (4)
what is the speed and gate number of a 32bit multiplier? (6)
What is the typical gate number of asic takes 1 mm2 area? (2)
Protecting a software using the serial number of the HDD (5)
whic number the mobile network use to know that the user is (2)
What are the ways to solve the parastive cap of the capacity (2)
What is the difference between the signal and the waveform? (2)
What is the difference between the communication and the tel (3)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS