That's really true. High-precision multiplication!!!!!

Source: Internet
Author: User

RX-0-ha haha haha haha haha haha ™™™

First on the real truth · High accuracy multiplication Source code :

High-precision multiplication

rx-0 making
> Last modified: July 6, 2016
#include <stdio.h>
#include <string.h>
#include <math.h>
Char s[10000],b;
Int a[10000];
Int c[10000];
Int main ()
{
int x,l=0,y=1,i,j,m,l1=0;
Long Long s1=0;
//freopen ("hp.in", "R", stdin);
//Freopen ("Hp.out", "w", stdout);
1. scanf ("%s", s);
scanf ("%d", &x);
L=strlen (s);//String length
2. for (i=0;i<=l-1;i++)
{
a[l-1-i]=s[i]-48;
}
3. for (i=0;i<=l-1;i++)
{
c[i]+=a[i]*x;
int j=i+1;
while (c[j-1]!=0)
{
if (j>l) l++;
C[J]+=C[J-1]/10;
c[j-1]%=10;
J + +;
}
}
for (i=l-1;i>=0;i--)
{
printf ("%d", C[i]);
}
return 0;
}

Ideas ™:

1. Use string input because you want to measure length (so use the string function)

2. Because you want to calculate, change the array

3. ( emphasis ) by the high precision points in each bit multiplied by the number of plastic, carry the words of the next to each of you, the standard only reserved single-digit!!!!! Simple

Thanks for watching!!!

Have the ability to admire a face evaluation or praise ...

rx-0® Production

That's really true. High-precision multiplication!!!!!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.