lógica

Convert Roman numerals [duplicate]

this question already has an answer here : ... aRom[i]); numero -= vaNum[i]; } else { i++; } } }

When to use And, AndAlso and Or, OrElse? [duplicate]

this question already has answers here : ... 2: if(lastToken == 0 & lastToken > 2) { ... } But I don't know if I use & or &&. Which should I use?

What is the difference between the logical operators NOT, AND and or? [duplicate]

this question already has an answer here : ... ors. What is the difference between the logical operators NOT, AND and or? And what is the difference between logic gates?

Concatenate Strings in C

Good afternoon, guys! I'm having a problem with Strings using the C Language. The problem asks the user to type a name, th ... he special character at the end of the string. However, I did not understand how to be added in the last vowel of the string.

Doubt about Logical Operators && and || in Java

I have the following code in my app: if (aquaName != null && !aquaName.getText().toString().isEmpty()){ values. ... ead of && Do I not reach condition else? I've read here on stack about | & || && but I can't understand.

Calculate the arithmetic mean of integers between 15 (inclusive) and 100 (inclusive)

I need to calculate the arithmetic mean of integers between 15 (inclusive) and 100 (inclusive). I made this code: x=0 for i ... estion was very subjective, I did not understand if either the value of the final mean of [15,100] or the mean of n + 1 / N.

Transform result combination function into a dynamic function

I have a function that generates all possible combinations of numbers from 1 to 10. The combinations are 4 numbers, that is, ... numbers, but so it gets complicated because there are some cases that I would need to do more than 20 for everything in mao.

C code skipping user input

Hello! I'm a newbie and I'm trying to make a program to read a list of information entered into it. Until the first line it w ... -------------------------\n"); } Could you help me understand this problem? Could you suggest improvements to the code? Att.

Logic SELECT CASE WHEN

I would like help in building the following logic: I have my main table and two other tables A and B, which have foreign ke ... N 'Tipo 1 e 2' ELSE 'Tipo 1' END end else 'Tipo 2' END ) AS tipo from principal as p left join A on p.id_inf = A.id_inf

Fill vector in C

I have an exercise that asks the teacher to type 5 notes, and display the typed notes, I wrote the code, but it is not runnin ... "Digite a nota do usuário!\\n"); scanf("%f", &[i]); } printf("As notas digitadas foram %.2f\\n", nota[i]); return 0; }

Understanding Exercise Book use Java head

I did not understand the operation of the code below, maybe later in the book I have better explanations or I let something p ... the output of m4 printed 2 times, I did not find the because of this, it is banal thing but to finish, this doubt remained.

Store the positives in one vector and the negatives in another

Make an algorithm that reads a set of 30 integer numerical values and distributes them between two vectors, separating the ... that this error occurs because it needs something like a delimiter for the vector, but not sure if that's it, what can I do?

Error "segmentation fault core dumped" in C

I'm kind of a novice yet but I still haven't been able to solve such a problem, so I came to resort here. I use linux and I'm ... etra %s\n\n",nome,num,(char)num); return 0; } If you have any suggestions for improvement of the code, I accept as well.

Sum of integers from 1 to 100

I'm trying to create an algorithm that adds up the numbers from the range 1-100. Further the program prints each element of t ... 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + A soma dos inteiros de 1 à 100 é: 5151

When to use if or else If?

Is a pretty silly thing, but during my writing I came across the following question: When is it really necessary to use if's ... k:</p> @Html.EditorFor(model => model.NomeNotebook, new { htmlAttributes = new { @class = "form-control" } }) }

What is the difference between fuzzy logic and Boolean logic?

I was Reading about fuzzy logic and I realized that it has relations with Boolean logic. However, I was very confused at the ... relationship between them? we can use fuzzy logic in programming or it is restricted only for other fields of mathematics?

Programming logic exercise

I'm still crawling in this world of programming and have tried to solve a logic problem by myself involving the Fibonacci seq ... I thank everyone who provides a time to heal my I doubt and ask you to provide some content that can add value to my studies.

Doubt in attribution via destructuring-Javascript

I could not understand the following code: //Esse array vai modificar o DOM com o seu conteúdo const elementos = [ ... case, my doubt is: why at the time of assigning, it is not necessary to put the brackets? Ex: [{tag, texto}] = elementos[i];

I need help in this my Roman numeral Code (C language)

Well, I created this code as a form of draft pro project that I have in which it turns certain words into decimal values, but ... , &cad); cotinter = cot2dec(cad); printf("O valor decimal de %s e %d", cad, cotinter); return 0; }

Find out how many are of age in Windows Forms application

I'm trying to do an exercise in C# using Windows Forms that how many are over 18 years old.The algorithm should read the age ... } MessageBox.Show("Existem" + qtde + "pessoas com mais de 18 anos"); } } } }