ng System;
public class Program
{
public static void Main()
{
int n = int.Parse(Console.ReadLine());
int m = int.Parse(Console.ReadLine());
int k = int.Parse(Console.ReadLine());
int[,] matrix = new int[n, m];
for (int i = 0; i < n; i++)
lic string binario(int n)
{
string binario = "";
for (int i = 0; i < n; i++)
{
binario += "0";
}
return binario;
}
A:
O problema é que você está concatenando um caractere nulo no final da string, e isso faz com que o método ToString() retorne uma string vazia
lic string binario(int n)
{
string binario = "";
for (int i = 0; i < n; i++)
{
binario += "0";
}
return binario;
}
A:
O problema é que você está concatenando um caractere (o 0) com uma string (binario). O correto seria concatenar a string com a string,
nclude <iostream>
#include <cmath>
using namespace std;
int main() {
int altura;
int largura;
int area;
int perimetro;
int x, y;
int x2;
int y2;
int x3;
int y3;
int x4;
int y4;
int x5;
int y5;
int x6;
int y6;
int
You can use the following code to get the code of the selected text in the editor:
var editor = ace.edit("editor");
var selection = editor.getSelection();
var range = selection.getRange();
var start = range.start;
var end = range.end;
var code = editor.session.getTextRange(
ng System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using
You can use the following code to get the result you want:
string html = @"<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>";
string pattern = @"(?<=<td>)(.*?)(?=</td>)";
Regex rgx = new Regex(pattern);
foreach (Match m in rg
ng System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Net;
using System.Net.Sockets;
using
lic static string toBinary(int n)
{
string bin = "";
while (n > 0)
{
bin += n % 2 + '0';
n /= 2;
}
return bin;
}
A:
You can use the following code to convert a number to binary:
public static string ToBinary(int n)
{
string binary = "";
while (n
lic string toBin(int n)
{
string bin = "";
while (n != 0)
{
bin += n % 2 + '0';
n /= 2;
}
return bin;
}
A:
You can use the following code to convert a number to binary:
public string toBin(int n)
{
string bin = "";
while (n !
lic string DecimalToBinary(int n)
{
string bin = "";
while (n > 0)
{
bin += n % 2 + '0';
n /= 2;
}
return bin;
}
A:
You can use the following code to convert a decimal number to binary:
public string DecimalToBinary(int n)
{
string bin = "";
while (
ng System;
public class Program
{
public static void Main()
{
int numero = int.Parse(Console.ReadLine());
int numero2 = int.Parse(Console.ReadLine());
int numero3 = int.Parse(Console.ReadLine());
int numero4 = int.Parse(Console.ReadLine());
int numero5 = int.Parse(
ng System;
public class Triangulo
{
public static void Main()
{
int a, b, c;
Console.WriteLine("Introduce los lados del triangulo");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (
lic static string toBinary(int n)
{
string bin = "";
while (n > 0)
{
bin += n % 2 + '0';
n /= 2;
}
return bin;
}
A:
You can use the following code to convert a number to binary:
public static string ToBinary(int n)
{
string binary = "";
while (n
lic static string toBinary(int n)
{
string bin = "";
while (n > 0)
{
bin += n % 2 + '0';
n /= 2;
}
return bin;
}
A:
You can use the following code to convert a number to binary:
public static string ToBinary(int n)
{
string binary = "";
while (n
You can use the following code to get the code of the selected text in the editor:
var editor = ace.edit("editor");
var selection = editor.getSelection();
var range = selection.getRange();
var start = range.start;
var end = range.end;
var code = editor.session.getTextRange(
ng System;
public class Triangulo
{
public static void Main()
{
int a, b, c;
Console.WriteLine("Introduce los lados del triangulo");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (
import unittest
class TestTriangle(unittest.TestCase):
def test_triangle(self):
triangle = Triangle(1,2,3)
self.assertEqual(triangle.area(), 6.0)
self.assertEqual(triangle.perimeter(), 6.0)
self.assertEqual(triangle.sides(), [1,2,3])
self.assertEqual(triangle
You can use the following code to get the code of the selected text in the editor:
var editor = ace.edit("editor");
var selection = editor.getSelection();
var range = selection.getRange();
var start = range.start;
var end = range.end;
var code = editor.session.getTextRange(
ng System;
public class Triangulo
{
public static void Main()
{
int a, b, c;
Console.WriteLine("Introduce los lados del triangulo");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (
ng System;
public class Triangulo
{
public static void Main()
{
int a, b, c;
Console.WriteLine("Introduce los lados del triangulo");
a = int.Parse(Console.ReadLine());
b = int.Parse(Console.ReadLine());
c = int.Parse(Console.ReadLine());
if (
ng System;
public class Program
{
public static void Main()
{
int n = int.Parse(Console.ReadLine());
int m = int.Parse(Console.ReadLine());
int k = int.Parse(Console.ReadLine());
int[,] matrix = new int[n, m];
for (int i = 0; i < n; i++)
ng System;
public class Program
{
public static void Main()
{
int n = int.Parse(Console.ReadLine());
int m = int.Parse(Console.ReadLine());
int k = int.Parse(Console.ReadLine());
int[,] matrix = new int[n, m];
for (int i = 0; i < n; i++)