Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
pasar de binario a decimal
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine("Hello, world!"); int n = 1100111; int [] a = new int [] {1,1,0,0,1,1,1}; double x = 0; int j = a.Length-1; for ( int i = 0; i < a.Length ; i++ ) { x += a[i]*Math.Pow(2,j); j -= 1; } Console.WriteLine(x); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Search Element In Array-Recursive
ConcurrentQueue<T>
Shift Example
Fibonachi
DijkstraAlgo
jkb
f
SpiltStringBetweenSpecialCharacters
iran
Selection Sort
Please log in to post a comment.