Студопедия

КАТЕГОРИИ:

АстрономияБиологияГеографияДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРиторикаСоциологияСпортСтроительствоТехнологияФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника


Распечатка программы




#include "mainwindow.h"

#include "ui_mainwindow.h"

#include "stdio.h"

#include "QString"

#include "qstring.h"

#include "stdlib.h"

#include "QProgressBar"

MainWindow::MainWindow(QWidget *parent) :

QMainWindow(parent),

ui(new Ui::MainWindow)

{

ui->setupUi(this);

ui->progressBar->setValue(0);

ui->textBrowser_2->setText("0");

ui->textEdit_pin->hide();

ui->pushButton_ans->hide();

ui->pushButton_pin->hide();

ui->pushButton_user->hide();

ui->label_11->hide();

ui->textBrowser_3->hide();

}

MainWindow::~MainWindow()

{

delete ui;

}

void MainWindow::on_pushButton_2_clicked()

{

int num = ui->plainTextEdit_2->toPlainText().toInt();

if(num==1)

{

if(ui->pz1->toPlainText()=="+")

ui->textBrowser->setText("3 15\n2 1\n You've' already done this.");

else

ui->textBrowser->setText("3 15\n2 1");

}

if(num==2)

{

if(ui->pz2->toPlainText()=="+")

ui->textBrowser->setText(" 0 4\n-2 132\nYou've' already done this.");

else

ui->textBrowser->setText(" 0 4\n-2 132");

}

if(num==3)

{

if(ui->pz3->toPlainText()=="+")

ui->textBrowser->setText("144 132\n-11 -8\n You've' already done this.");

else

ui->textBrowser->setText("144 132\n-11 -8");

}

if(num==4)

{

if(ui->pz4->toPlainText()=="+")

ui->textBrowser->setText("5 1 6\n3 4 8\n0 1 5\n You've' already done this.");

else

ui->textBrowser->setText("5 1 6\n3 4 8\n0 1 5");

}

if(num==5)

{

if(ui->pz5->toPlainText()=="+")

ui->textBrowser->setText("2 -3 11\n0 0 -2\n5 -1 9\n You've' already done this.");

else

ui->textBrowser->setText("2 -3 11\n0 0 -2\n5 -1 9");

}

if(num==6)

{

if(ui->pz6->toPlainText()=="+")

ui->textBrowser->setText("11 -6 -12\n0 -1 5\n4 8 16\n You've' already done this.");

else

ui->textBrowser->setText("11 -6 -12\n0 -1 5\n4 8 16");

}

if(num==7)

{

if(ui->pz7->toPlainText()=="+")

ui->textBrowser->setText("1 0 -1 3\n7 4 8 -2\n0 -6 3 4\n1 8 1 0\n You've' already done this.");

else

ui->textBrowser->setText("1 0 -1 3\n7 4 8 -2\n0 -6 3 4\n1 8 1 0");

}

if(num==8)

{

if(ui->pz8->toPlainText()=="+")

ui->textBrowser->setText("0 0 14 -6\n1 8 0 -1\n-4 3 3 3\n16 0 -1 -2\n You've' already done this.");

else

ui->textBrowser->setText("0 0 14 -6\n1 8 0 -1\n-4 3 3 3\n16 0 -1 -2)");

}

if(num==9)

{

if(ui->pz9->toPlainText()=="+")

ui->textBrowser->setText("-5 7 -16 28\n7 4 8 -2\n0 -6 3 4\n1 8 1 0\n You've' already done this.");

else

ui->textBrowser->setText("-5 7 -16 28\n7 4 8 -2\n0 -6 3 4\n1 8 1 0");

}

if(num==10)

{

if(ui->pz10->toPlainText()=="+")

ui->textBrowser->setText("1 5-3 0-5 0-6 3 5 0\n0 5 0 6 0 0 5 0 0 0\n0 4 0 5 1 1 0 9 0 1\n5 0 5 9 0 0 9 6 0 0\n0 5 0 0 2 0 2 0 0 1\n6 6 1 0 0 0 0 6 0 0\n0 0 0 6 5 0 5 0 5 1\n0 0 0 0 0 0 0 9 0 0\n6 0 5 1 0 5 0 7 0 4\n0 5 0 1 0 0 5 0 2 0\n You've' already done this.");

else

ui->textBrowser->setText("1 5-3 0-5 0-6 3 5 0\n0 5 0 6 0 0 5 0 0 0\n0 4 0 5 1 1 0 9 0 1\n5 0 5 9 0 0 9 6 0 0\n0 5 0 0 2 0 2 0 0 1\n6 6 1 0 0 0 0 6 0 0\n0 0 0 6 5 0 5 0 5 1\n0 0 0 0 0 0 0 9 0 0\n6 0 5 1 0 5 0 7 0 4\n0 5 0 1 0 0 5 0 2 0");

}

if(num>10)

ui->textBrowser->setText("No such nomber");

if(!(ui->plainTextEdit_2->toPlainText().toInt())||num<1)

ui->textBrowser->setText("Something wrong");

}

void MainWindow::on_pushButton_clicked()

{

QString z1p,z3p,z2p,z4p,z5p,z6p,z7p,z8p,z9p,z10p;

int i=0,s;

bool f=true;

int prog=ui->textBrowser_2->toPlainText().toInt();

int num = ui->plainTextEdit_2->toPlainText().toInt();

ui->textBrowser_3->hide();

ui->label_2->setText(" ");

ui->label_3->setText(" ");

ui->label_4->setText(" ");

ui->label_5->setText(" ");

ui->label_6->setText(" ");

if (num==1)

{

z1p=ui->plainTextEdit->toPlainText();

QString z1="3*1-15*2";

s=3*1-15*2;

for (i=0;i<=z1p.size()&&f==true;i++)

if(z1p[i]!=z1[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if (z1p.size()<z1.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z1p.size()>z1.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (z1p.size()==0)

{

ui->label_6->setText("You didn't write anything.");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz1->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz1->setText("+");

}

}

}

if (num==2)

{

z2p=ui->plainTextEdit->toPlainText();

QString z2="0*132-4*(-2)";

s=0*132-4*(-2);

for (i=0;i<=z2p.size()&&f==true;i++)

if(z2p[i]!=z2[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z2p.size()<z2.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z2p.size()>z2.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz2->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz2->setText("+");

}

}

}

if (num==3)

{

z3p=ui->plainTextEdit->toPlainText();

QString z3="144*(-8)-132*(-11)";

s=144*(-8)-132*(-11);

for (i=0;i<=z3p.size()&&f==true;i++)

if(z3p[i]!=z3[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z3p.size()<z3.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z3p.size()>z3.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_3->setText(QString::number(s));

ui->label_2->setText("Good job!");

if(ui->pz3->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz3->setText("+");

}

}

}

if (num==4)

{

z4p=ui->plainTextEdit->toPlainText();

QString z4="5*(4*5-1*8)-1*(3*5-8*0)+6*(3*1-4*0)";

s=5*(4*5-1*8)-1*(3*5-8*0)+6*(3*1-4*0);

for (i=0;i<=z4p.size()&&f==true;i++)

if(z4p[i]!=z4[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z4p.size()<z4.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z4p.size()>z4.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz4->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz4->setText("+");

}

}

}

if (num==5)

{

z5p=ui->plainTextEdit->toPlainText();

QString z5="2*(0*9-(-1)*(-2))-(-3)*(0*9-(-2)*(-1))+11*(0*(-1)-0*5)";

s=2*(0*9-(-1)*(-2))-(-3)*(0*9-(-2)*(-1))+11*(0*(-1)-0*5);

for (i=0;i<=z5p.size()&&f==true;i++)

if(z5p[i]!=z5[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z5p.size()<z5.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z5p.size()>z5.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_3->setText(QString::number(s));

ui->label_2->setText("Good job!");

if(ui->pz5->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz5->setText("+");

}

}

}

if (num==6)

{

z6p=ui->plainTextEdit->toPlainText();

QString z6="11*((-1)*16-5*8)-(-6)*(0*16-5*4)+(-12)*(0*8-(-1)*4)";

s=11*((-1)*16-5*8)-(-6)*(0*16-5*4)+(-12)*(0*8-(-1)*4);

for (i=0;i<=z6p.size()&&f==true;i++)

if(z6p[i]!=z6[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z6p.size()<z6.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z6p.size()>z6.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz6->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz6->setText("+");

}

}

}

if (num==7)

{

z7p=ui->plainTextEdit->toPlainText();

QString z7="1*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-0*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-1)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-3*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1))";

s=1*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-0*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-1)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-3*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1));

for (i=0;i<=z7p.size()&&f==true;i++)

if(z7p[i]!=z7[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z7p.size()<z7.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z7p.size()>z7.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz7->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz7->setText("+");

}

}

}

if (num==8)

{

z8p=ui->plainTextEdit->toPlainText();

QString z8="0*(8*(3*(-2)-3*(-1))-0*(3*(-2)-3*0)+(-1)*(3*(-1)-3*0))-0*(1*(3*(-2)-3*0)-0*(-4*(-2)-3*16)+(-1)(-4*(-1)-3*16))+14*(1*(3*(-2)-3*0)-8*((-4)*(-2)-3*16)+(-1)*(-4*(-1)-3*16))-6*(1*(3*(-1)-3*0)-8*(-4*(-1)-3*16)+0*(-4*0-3*16))";

s=7162;

for (i=0;i<=z8p.size()&&f==true;i++)

if(z8p[i]!=z8[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z8p.size()<z8.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z8p.size()>z8.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz8->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz8->setText("+");

}

}

}

if (num==9)

{

z9p=ui->plainTextEdit->toPlainText();

QString z9="-5*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-7*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-16)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-28*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1))";

s=-5*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-7*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-16)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-28*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1));

for (i=0;i<=z9p.size()&&f==true;i++)

if(z9p[i]!=z9[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z9p.size()<z9.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z9p.size()>z9.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz9->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz9->setText("+");

}

}

}

if (num==10)

{

ui->textBrowser_3->show();

z10p=ui->plainTextEdit->toPlainText();

QString z10="1*(5*(0*(9*(2*(0*(5*(9*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5))-*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5))+*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5)))";

s=6038082;

for (i=0;i<=z10p.size()&&f==true;i++)

if(z10p[i]!=z10[i])

{

ui->label_2->setText("Mistake after");

ui->label_4->setText(QString::number(i));

ui->label_5->setText("element!");

f=false;

}

if (z10p.size()<z10.size())

{

ui->label_6->setText("You missed something or didn't finish term");

f=false;

}

if (z10p.size()>z10.size())

{

ui->label_6->setText("You wrote more then need. Check your derivation");

f=false;

}

if (s!=ui->textEdit_2->toPlainText().toInt())

{

ui->label_6->setText("Wrong answer. Check again (answer: 6038082)");

f=false;

}

if(f==true)

{

ui->label_2->setText("Good job!");

if(ui->pz10->toPlainText()!="+")

{

prog++;

ui->textBrowser_2->setText(QString::number(prog));

ui->progressBar->setValue(prog*10);

ui->pz10->setText("+");

}

}

}

if(prog==10)

ui->label_10->setText("Congratulations! You know how to find the determinant of matrix. Good luck!");

}

void MainWindow::on_pushButton_pin_clicked()

{

int i;

bool prpin=true;

QString pin="2036", pinp;

pinp=ui->textEdit_pin->toPlainText();

for(i=0;i<4;i++)

if(pin[i]!=pinp[i])

{

ui->label_pin->setText("Wrong PIN! Try again.");

prpin=false;

}

if(prpin==true)

{

ui->pushButton_ans->show();

ui->pushButton_user->show();

ui->label_pin->setText(" ");

ui->pushButton_admin->hide();

ui->pushButton_pin->hide();

ui->label_11->hide();

ui->textEdit_pin->hide();

ui->textEdit_pin->setText("");

}

}

void MainWindow::on_pushButton_admin_clicked()

{

ui->pushButton_pin->show();

ui->textEdit_pin->show();

ui->label_11->show();

}

void MainWindow::on_pushButton_user_clicked()

{

ui->pushButton_ans->hide();

ui->pushButton_user->hide();

ui->plainTextEdit->clear();

ui->pushButton_admin->show();

}

void MainWindow::on_pushButton_ans_clicked()

{

int s;

int num = ui->plainTextEdit_2->toPlainText().toInt();

if (num==1)

{

ui->plainTextEdit->setPlainText("3*1-15*2");

s=3*1-15*2;

ui->label_3->setText(QString::number(s));

}

if (num==2)

{

s=0*132-4*(-2);

ui->plainTextEdit->setPlainText("0*132-4*(-2)");

ui->label_3->setText(QString::number(s));

}

if (num==3)

{

s=144*(-8)-132*(-11);

ui->plainTextEdit->setPlainText("144*(-8)-132*(-11)");

ui->label_3->setText(QString::number(s));

}

if (num==4)

{

s=5*(4*5-1*8)-1*(3*5-8*0)+6*(3*1-4*0);

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("5*(4*5-1*8)-1*(3*5-8*0)+6*(3*1-4*0)");

}

if (num==5)

{

s=2*(0*9-(-1)*(-2))-(-3)*(0*9-(-2)*(-1))+11*(0*(-1)-0*5);

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("2*(0*9-(-1)*(-2))-(-3)*(0*9-(-2)*(-1))+11*(0*(-1)-0*5)");

}

if (num==6)

{

s=11*((-1)*16-5*8)-(-6)*(0*16-5*4)+(-12)*(0*8-(-1)*4);

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("11*((-1)*16-5*8)-(-6)*(0*16-5*4)+(-12)*(0*8-(-1)*4)");

}

if (num==7)

{

s=1*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-0*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-1)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-3*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1));

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("1*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-0*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-1)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-3*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1))");

}

if (num==8)

{

s=7162;

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("0*(8*(3*(-2)-3*(-1))-0*(3*(-2)-3*0)+(-1)*(3*(-1)-3*0))-0*(1*(3*(-2)-3*0)-0*(-4*(-2)-3*16)+(-1)(-4*(-1)-3*16))+14*(1*(3*(-2)-3*0)-8*((-4)*(-2)-3*16)+(-1)*(-4*(-1)-3*16))-6*(1*(3*(-1)-3*0)-8*(-4*(-1)-3*16)+0*(-4*0-3*16))");

}

if (num==9)

{

s=-5*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-7*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-16)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-28*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1));

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("-5*(4*(3*8-4*1)-8*(-6*0-4*8)+(-2)*(-6*1-3*8))-7*(7*(3*8-4*1)-8*(0*0-4*1)+(-2)*(0*0-3*1))+(-16)*(7*(-6*0-4*8)-4*(0*0-4*1)+(-2)*(0*8-(-6)*1))-28*(7*(-6*1-3*8)-4*(0*1-3*1)+8*(0*8-(-6)*1))");

}

if (num==10)

{

s=6038082;

ui->label_3->setText(QString::number(s));

ui->plainTextEdit->setPlainText("1*(5*(0*(9*(2*(0*(5*(9*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5))-*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5))+*(0*0-4*2)-0*7*0-4*0)+0*(7*2-0*0))-0*(0*(0*0-4*2)-0*0*0-4*5)+0*(0*2)-0*5))+5*(0*(7*0-4*0)-9*(0*0-4*5)+0*(0*0-7*5)))");

}

}

void MainWindow::on_pushButton_3_clicked()

{

ui->plainTextEdit->clear();

ui->textEdit_2->clear();

ui->textEdit_pin->clear();

ui->plainTextEdit_2->clear();

ui->textBrowser->clear();

}


Поделиться:

Дата добавления: 2015-08-05; просмотров: 103; Мы поможем в написании вашей работы!; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2024 год. (0.007 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты