comparação

How to use toupper () function in char in C?

I am creating a variable: char nome[20]; After this, I am asking the user to enter with a name: printf("Digite um nome : " ... (const char*, const char*)' Would I have to convert the variable with the function toupper() before the if? Or inside it ?

Make comparison using String.Contains () disregarding casing

I need to check if a certain term exists within a string (in SQL it's something like like '%termo%'). The point is that I ne ... uim Pedro Soares"; mainStr.Contains("JOA"); mainStr.Contains("Quim"); mainStr.Contains("PEDRO"); mainStr.Contains("PeDro");

Comparison of char in C

I need to figure out whether or not each element of a chained list is a vowel. How can I fix my code? int BuscaNv(LISTA* re ... Typedefs: typedef struct estr { char letra; struct estr *prox; } NO; typedef struct { NO *inicio; } LISTA;

What is a loose comparison?

In the PHP documentation , about switch it says: Note : Note that switch / case does loose comparison. What is a loose comparison? And what is the difference between a loose comparison and a rigid one?

How to do verification with binary operations?

I have an application where I separate the errors by range , e.g. system errors of 10-19, i.e. 10 slots for system errors, t ... anything. If for example erro = 21 then enter the if. I'm doing this in Java, but I think the idea might suit any situation.

How to receive a string and by switch do the check in C?

I have to develop an algorithm that gets the name of a place, for example, "School", and based on this, do a check of the str ... C the concept of string is very different, and it turns out to be more like a array than string , being vague the concept

Comparing only the DateTime field date in C#

I need to compare only the date of two fields DateTime. DateTime aux = new DateTime(2016, 09, 02, 10, 0, 0); if (aux.Equals( ... is equal on both objects. In this case it does not enter because the Time of the two objects is different. What should I do?

code to return divisors and compare common ones

I am trying to create a code that returns me the common divisors between 2 variables that receive integers. And then show the ... of 2 values and not just one. In addition to comparing the common divisors between them, as I could not think of a way to do.

Comparison of an image with others (analyze whether the chosen image is the same as the others already predefined or not)

I am trying to make a code in Java that compares an input image with other N images already defined in the code. I developed, ... t y=0; y<image1.getHeight(); y++){ if(image1.getRGB(x,y)!=image2.getRGB(x,y)){ return(false);

What are the differences between the "equals()", "compareTo()", and even "== " methods?

I am aware that there are differences between comparing objects using equals(), compareTo() and even the operator ==, but in detail what are the differences between them and the care we should take in the use of each?

Sort string containing letters and numbers

I have a list of objects that has an integer and a String (consisting of letters and numbers). I would like to sort by this i ... g is getting sorted incorrectly. How can I sort a string by alphabetical order, which also obeys the numbers that compose it?

How to compare dates in PHP?

I would like to know which function I use to compare two dates and return the largest. I have a form for HR registration in ... a suggestion how to solve this I found some solutions but the date format was in default American what does not suit me. Att.

Function " strcmp () "working without adding" string.h"

I wrote an algorithm in C that uses the function strcmp(). Even forgetting to add the string.h the algorithm worked. I would ... for(i=0;i<10;i++){ printf("Nome: %-10s\t Preco:%5.2f \t\n",Estoque[i].nome,Estoque[i].preco); } return 0; }

"Warning comparison between pointer and integer" - what is it?

While compiling the code in C language I got this error: [Warning] comparison between pointer and integer Regarding ... tor[50]; char editora[50]; }livro[TAM]; And TAM a constant: #define TAM 5 What is happening and how can I solve it?

Find differences between arrays, with probability of variation

Good Afternoon folks, I'm reading about the numpy library's setdiff1d function ( https://docs.scipy.org/doc/numpy/reference/g ... ction to work in this way, where I can set as an argument a margin of variation between the values to be compared? Grateful.

Compare the element with the rest of the Python List

I need to create a program where in the given list, if the name is repeated it puts a numbering. For example: names = [maria, ... set up a code where it compares with the next name, I do not know how it does to continue the comparison. Follow my Code:

Double factorial in r with letters for differentiation

Dear I am trying to perform a double or two-away anova factor analysis. I would like to know how do I generate the letters o ... t mean in treatment x,y,z and etc... and within each cultivar what is the best treatment to be applied to it. Thank you all.

What does the solution make comparisons against strings in the following code? JS

The statement of the exercise is : Declare the weekday variable that receives a string "Sunday". Then implement a conditional ... t strings! I have searched the internet about the different ways of comparison, but I did not find any result for this error.

Problem with my Stone, Paper and scissors game

I'm having a problem in the function maquina(), the function is not being able to perform any action, I think the function is ... `); if (jgdJogador == '1' || jgdJogador == '2' || jgdJogador == '3'){ maquina(jgdJogador); } }

Game of popping balls on the screen

I posted only the JS, I think it's enough, I'm still new in JS and programming so I know almost nothing of the commands, I wa ... lementById("placar").innerHTML = 0; document.getElementById("missClick").innerHTML = 0; setInterval(addBola, 600); }