Пример #1
0
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);
}
Пример #2
0
void QtnpGraphicDialog::on_avg_clicked()
{
	insert_f("avg");
}
Пример #3
0
void QtnpGraphicDialog::on_sum_clicked()
{
	insert_f("sum");
}
Пример #4
0
void QtnpGraphicDialog::on_max_clicked()
{
	insert_f("max");
}
Пример #5
0
void QtnpGraphicDialog::on_min_clicked()
{
	insert_f("min");
}
Пример #6
0
void QtnpGraphicDialog::on_sqrt_clicked()
{
	insert_f("sqrt");
}
Пример #7
0
void QtnpGraphicDialog::on_atan_clicked()
{
	insert_f("atan");
}
Пример #8
0
void QtnpGraphicDialog::on_acos_clicked()
{
	insert_f("acos");
}
Пример #9
0
void QtnpGraphicDialog::on_ctg_clicked()
{
	insert_f("(1/tan");
	insert(")");
	ui->formula->setCursorPosition(ui->formula->cursorPosition()-1);
}