Hi all,
I am trying to display the multiples of a number using QList<QString> but i was not able to do it on my own.
In my coding when the user enters any number in the input it should display its multiple which means:for example,if the user enters number 4 the output should display the output as:4 8 12 16 20 24 28 32 36 40.
Likewise whenever the user enters any number it should display the output.
This is my code:
void MainWindow:n_pushButton_clicked()
{
int result;
bool ok;
int n1 = ui->lineEdit->text().toInt(&ok,10);
for (int i=1;i<= 10;i++)
{
result = n1 * i;
QList<QString> list ;
list << result;
}
I know that i am wrong somewhere anyone please help me with this?
So that i can know the answer.
Thanks in advance.
Regards,
Harish
Bookmarks