How do you correctly write a if than statement? [closed] - if-statement

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 21 hours ago.
Improve this question
Help please. This project is due tonight and I have absolutely no clue what Im doing. I need to code an if than statement.
Prompt the user for the salary per year and calculate a Christmas bonus based on the number of years worked as follow. Between 1 to 5 years 1% of salary, and more than five years 2% of salary. Any other values should be considered as an error message.
How do I write this in Visual Studio? I have tried so many different ways and I keep getting errors.
I tried to write - If Yearsworked less than 5 than and If yearsworked greater than 5. But thats wrong.

Related

Filling a dynamic array with integers c++ [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 27 days ago.
Improve this question
how to fill a dynamic array with input from the console? Im begginer
and can't understand it.
some help will make my day :|
You can realize this in several ways. Have a look on following post may it will help you..
Using scanf() in C++ programs is faster than using cin?

Get sql the property and field names regex [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
The community is reviewing whether to reopen this question as of 6 days ago.
Improve this question
I have regex:
(?:(\(\n\s*\[)|(?:,\[))(?<field>.*?)\]\s*(?<properties>.*\n.)
it's working partially as shown here:
https://regex101.com/r/5o3o1f/1
The problem being that my regex so far doesn't capture the data type description if that's interrupted by a newline like in those 2 cases I highlighted in the picture shared.

How to get catch regex group in ZSH? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 days ago.
This post was edited and submitted for review 4 days ago.
Improve this question
I have an if statement with regex, and I catch some groups in order to check the values.
So I'd like to know the equivalent of $BASH_REMATCH[$i] in ZSH.
Charles Duffy gave me answers to this question with a link telling me that the equivalent is $match[$i].
Thanks to him, and to the other advices he gave me.

Pass a QT label from false to true [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
Good evening, I am playing a monopoly style game, when I fall into the cell I would change it to the visibility to be true, now the problem is when the second player rolls, I cannot tell you that if the label is true that I pay a tax
if(ui->lblPropiedadJugador->setVisible(true)){
// Instrucciones de pago
}
It shows me the following error could not convert void to boolean.
Does anyone know if I can solve it, I would appreciate it very much
The function QWidget::setVisible() returns void. You should instead use
if (!ui->lblPropiedadJugador->isHidden()).

C++ input value process as math function [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I’m very new in C++ and I need your help. I want to use the input value as a mathematical function then print the result.
What i need is:
When user input: 2 +1 and hit Enter then output (cout>>)
should be your result is: 3 (the sum of 2 + 1)
The mathematical symbol could be + or * or / or -.
Could you please help me with some example?
Thanks in advance!
Search for "Reverse Polish notation" and implementation in C++