Subdomain Posts
C++ | 26 min ago
C++ | 17 hours ago
C++ | 17 hours ago
C++ | 1 day ago
C++ | 4 days ago
C++ | 4 days ago
C++ | 5 days ago
C++ | 5 days ago
C++ | 5 days ago
C++ | 5 days ago
Recent Posts
C# | 39 sec ago
PAWN | 53 sec ago
None | 1 min ago
Java | 1 min ago
PAWN | 1 min ago
Java | 1 min ago
PHP | 2 min ago
Java | 2 min ago
Java 5 | 2 min ago
None | 4 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 5th of Feb 2010 03:58:22 AM Download | Raw | Embed | Report
  1. void mult_unit(string fp1, string fp2)
  2. {
  3.         double exp1=-1, exp2=-1;
  4.         long double temp1=0, temp2=0, temp3=0;
  5.  
  6.         for(int a=0; a<23; a++)
  7.         {
  8.                 if(fp1[a]=='1')
  9.                         temp1 += pow(2, exp1);
  10.                 exp1--;
  11.         }
  12.  
  13.         cout << "temp1 = " << temp1 << endl;
  14.  
  15.         for(int a=0; a<23; a++)
  16.         {
  17.                 if(fp2[a]=='1')
  18.                         temp2 += pow(2, exp2);
  19.                 exp2--;
  20.         }
  21.  
  22.         cout << "temp2 = " << temp2 << endl;
  23.  
  24.         temp3 = temp1 * temp2;
  25.  
  26.         cout << "temp3 = " << temp3 << endl;
  27. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: