Q&A Discussões
? : are called Ternary Operators.
ex.
var = booleanExp ? ValueIfTrue : ValueIfFalse;
and that ? literally means "Asking a Question" Asking if the Boolean Expression is True.
If the Boolean Expression returned true, the Value for "True" will be assigned to the variable.
If the Boolean Expression returned false, the Value for "False" will be the one that'll be assigned to the variable instead.
I'm not asking a question, I just wanna share this to you guys 😁
18 Votos
6 Respostasusing a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.
0 Voto
1 RespostaIllegal Declaration
0 Voto
2 Respostaswhat is tjis code problem!
#include <iostream>
using namespace std;
int main()
{
int b = 5;
int arr[b] = {11, 35, 62, 555, 989};
int sum = 0;
for (int x = 0; x < 5; x++) {
sum += arr[x];
}
cout << sum << endl;
return 0;
}
I cannot make an array using int variable in order to define array's element number!?
1 Voto
7 RespostasPhp registration variables
-1 Voto
1 Respostapython
1 Voto
2 RespostasI'm not able to create the new path, I put in the variable path and value c: program files/java/jdk1.80_101 which is what this file is named and it still doesn't work on the command prompt, everytime I put in Javac I get Javac is not recognizable as an internal or external command, operable program or botch file. please help
0 Voto
4 Respostascan someone tell me how to make it impossible for a user to type a 'userchoice1[x]' value that does not range from 1 - 10.
If you also know a way I can make the user input another value for the 'userchoice1[x]' variable if it is less than 1, I'll appreciate you share the knowledge with me.
please see the short code below
1 Voto
2 RespostasHow can I make a reference for a list of variables. If false i want the system to check through all my variable to make sure they are false.
Code-
var2 = "Tanner"
var3 = "Jake"
question = input('What is your name? ')
if question == var2:
print('\nWelcome Back Tanner!')
if question == var3:
print('\nWelcome Back Jake!")
if question !=( This is where i need help!)( Is the != the correct way to write not equal?)
0 Voto
4 RespostasId vendria a ser lo mas parecido a una variable o maa comun como un nombre propio que identifica unica y especificamente al elemento asignado, para poder usarse con el codigo de css o js normalmente. pero la clase es como decir un apellido o una funcion como por ejemplo encabezado, todo elememto que vayaen el encabezado de nuestra pagina seria de class="encabezado"
0 Voto
2 RespostasWrite a program that uses a dynamic array that contains 5 items of double values. The size of the array is entered when the program is run. Aldo the 5 values must be entered. These tasks are done in the main ( ) function. Then write a function to display the 5 values. The function must have a pointer variable as a parameter. The function is called from the main ( ).
0 Voto
2 RespostasQuente hoje
Sticky position
2 Votes
Help please?
3 Votes
Online voting system
2 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
SQL practice
2 Votes
Game development
0 Votes
Ruby programming?
3 Votes