New course! Every coder should learn Generative AI!
Try a free lessonQ&A Discussions
? : 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 Votes
6 Answersusing 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 Votes
1 AnswerHot today
Strange narrowing conversion error from FLTK Color to Color Struct, Stroustrup's header Graph.h
0 Votes
[ solved ] Programming sickness
3 Votes
Effects on HTML and JavaScript
0 Votes
Help. Помогите пожалуйста
1 Votes
Izzy the iguana
0 Votes
Encryption and Decryption
1 Votes