Questions tagged as 'tipagem'

2
answers

Variable remains zero in a mathematical expression

My program looks like this: public void CalculaProporção() { decimal contagemSubida = 0 , contagemDescida = 0; int cSubida = 6, cDescida = 4, range = 10; contagemSubida += Convert.ToDecimal(cSubida*range/100...
asked by 01.11.2018 / 15:54
2
answers

How is it still possible to calculate 164-1, without issuing an overflow?

The limit of uint64 is (2 ^ 64) -1, or simply 1
asked by 04.04.2018 / 00:15
1
answer

Compiler reports typing error when there is no typing error

I have struct struct no { int numero[2]; std::string nome; float valorDoNome; struct no *esq, *dir; }; struct no *raiz, *aux1, *aux2,*favoritos; The function { raiz->valorDoNome=0; int posicao=1; for(unsigned i=...
asked by 23.06.2016 / 23:40
1
answer

How do I save the values of a String in a Double variable?

I have a String with the value x inside it (String value="x") I need to pass this value to a Double Variable, how do I pass the x value of the String to the variable? So if I convert from String to Double the value of the Double variable i...
asked by 22.06.2016 / 20:12
1
answer

SQLiteStudio data types

I'm using SQLiteStudio to model a database. At the time of creating the fields of a table, I noticed that it has some data types that do not appear in the SQLite documentation. For example, in the combobox where we chose the column type, it has:...
asked by 07.02.2016 / 18:28
2
answers

C # Challenge Exchange Variable Values

Recently I made a very simple challenge:    Change the value of two variables without using a third variable. int a = 5; int b = 3; a += b; // a = 8 b = a - b; // b = 5; a -= b; // a = 3; It is simple because they are arithmet...
asked by 20.01.2016 / 13:42
2
answers

Method does not correctly show expected result

I have this interface public interface Promocional { boolean aplicaDesconto(double porcentagem); default boolean aplicaDescontoDe10Porcento() { return aplicaDesconto(0.1); } } The class LivroFisico that extends...
asked by 01.08.2015 / 06:01
1
answer

How do I define a unit of measure in the value of the variable

I have a question asking me to calculate the volume value of an oil can, and thinking of that I will use float . How do I put a unit of measure, for example the variable altura = 50cm .     
asked by 05.08.2018 / 03:38
1
answer

Is there a way to change the field type of a query in delphi without having to delete and include it?

I have the following situation, I use PostgreSQL and Zeos in DelphiXE, I needed to update the component to better support LATIN1 x UTF-8, now I can work with all kinds of characters, blz. But another problem came up, some fields that were Mem...
asked by 26.04.2018 / 17:24
1
answer

Not booting error

I'm having a non-boot error, and I can not figure out why: #include <stdio.h> int main(){ const int LENGTH = 10; const int WIDTH = 5; const char NEWLINE = "\n"; int area; area = LENGHT * WIDTH; printf("Value of area : %d", ar...
asked by 12.12.2017 / 21:51