Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
conter 1 in binnary number
//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) { var number = Convert.ToInt32("00101001111111100010", 2); var counter = 0; var temp = number; while(temp > 0){ if(temp % 2 > 0)counter++; temp /= 2; } //Your code goes here Console.WriteLine(counter); } } }
run
|
edit
|
history
|
help
0
minimal path for triangle
expression evaluator wich is easy to extend
Project Euler Problem 10
масиви форіч
Async Multithreading
amstrong number
wwee
Generics Base class constraints
a.out
e