void output_deque() { int option,val; clrscr(); do{ printf("\n ********** output deque menu ********"); printf("\n 1.insert at right"); printf("\n 2. insert at left"); printf("\n 3. delete from left"); printf("\n 4. display"); printf("\n enter your choice"); scanf("%d",&option); switch(option) { case 1: printf("\n enter value to be inserted from right"); scanf("%d",&val); insert_r(val); break; case 2: printf("\n enter value to be inserted from left"); scanf("%d",&val); insert_f(val); break; case 3: val=delete_f(); if(val!=-999) printf("\n value deleted from left is = %d",val); break; case 4: display(); break; default: printf("\n wroung statement"); } }while(option<=4 && option>=1); }
void QtnpGraphicDialog::on_avg_clicked() { insert_f("avg"); }
void QtnpGraphicDialog::on_sum_clicked() { insert_f("sum"); }
void QtnpGraphicDialog::on_max_clicked() { insert_f("max"); }
void QtnpGraphicDialog::on_min_clicked() { insert_f("min"); }
void QtnpGraphicDialog::on_sqrt_clicked() { insert_f("sqrt"); }
void QtnpGraphicDialog::on_atan_clicked() { insert_f("atan"); }
void QtnpGraphicDialog::on_acos_clicked() { insert_f("acos"); }
void QtnpGraphicDialog::on_ctg_clicked() { insert_f("(1/tan"); insert(")"); ui->formula->setCursorPosition(ui->formula->cursorPosition()-1); }