I need to somehow check if there is any element within a given array and if it exists, put a string in a specific place. For example:
I need to check if $categoria is not empty
$categoria = array($values);
...
I'm asking the question Voice Dialing , I've done all the possible tests and I do not find the error could help me in other tests that my code fails
My code
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int i...
$var = 123 456 789;
I need the value of this variable to be:
$var = 123,456,789;
Or add a comma after the number:
$var = 123, 456, 789;
I tried this way:
str_replace($var," ","")
String str = new String("Bruno Oliveira");
String str2 = new String("Gustavo Oliveira");
System.out.println(str.equals(str2)); //retorna false
How to compare only a certain part of a string?
Problem
I want to get the last digits of this string , so I used the Substring() method, however I had to use the variable "numero" again within the Substring() method.
string numero = "123456789";
string final = numero....
I'm doing a program that captures the complete name of a person and reproduces it in this format: surname, name without surname (EX: João Carlos Cunha -> João Cunha, Amanda Batista -> Batista, Amanda). Only the user can type as many names as he...
I'm trying to fill in the fields of a struct with strcpy but I'm not getting the expected value, such as:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
struct Aluno {...
nota = -1
while nota < 0 or nota > 10:
nota = int(input("Informe a nota entre 0 e 10: "))
if nota < 0 or nota > 10:
print("Valor inválido")
I need to include in this validation code for, if the user types string (a,...
I'm doing a college assignment that asks for a program where the user types the string [20] and I return the inverted string and the vowels replaced by @s.
How do I do this?