Jump to content

Расчёт прибыли


qmxptnzbvtrwd@yandex.ru

Recommended Posts

Я бы вообще не сказал, что есть старые языки. У каждого свои плюсы и минусы. Конечно, мир не стоит на месте, но не все новое лучше старого ;) Я вообще вот Java обожаю :)

Link to comment
Share on other sites

Может все же лучше было бы использовать сase вместо if ? Если ошибаюсь, поправьте )

 

с case лично не знаком, пока что, потом почитаю и переделаю, может быть) спасибо за совет))
Link to comment
Share on other sites

собрал некий "симулятор точки предметов" http://rghost.ru/54817185

конечно, шанс не такой как в игре, и даже не приблизительный, но поиграться будет забавно))

int z1,x1,c1,z2,x2,c2,z3,x3,c3,z4,x4,c4,z5,x5,c5,z6,x6,c6,z7,x7,c7,z8,x8,c8,z9,x9,c9,z10,x10,c10;if (n==0){x1=1; z1=3;c1 = x1 + rand() % z1;        if (c1==2)        {Label4->Caption="Предмет усилен на +1!"; n=1;}        else {n=0;} }if (n==1){x2=1; z2=5;c2 = x2 + rand() % z2;        if (c2==2)        {Label4->Caption="Предмет усилен на +2!"; n=2;}        else {n=1; }}if (n==2){x3=1; z3=10;c3 = x3 + rand() % z3;        if (c3==2)        {Label4->Caption="Предмет усилен на +3!"; n=3;}        else {n=2;}}if (n==3){x4=1; z4=15;c4 = x4 + rand() % z4;        if (c4==2)        {Label4->Caption="Предмет усилен на +4!"; n=4;}        else {n=3;} }if (n==4){x5=1; z5=25;c5 = x5 + rand() % z5;        if (c5==2)        {Label4->Caption="Предмет усилен на +5!"; n=5;}        else {n=4; }}if (n==5){x6=1; z6=40;c6 = x6 + rand() % z6;        if (c6==2)        {Label4->Caption="Предмет усилен на +6!"; n=6;}        else {n=5;} }if (n==6){x7=1; z7=50;c7 = x7 + rand() % z7;        if (c7==2)        {Label4->Caption="Предмет усилен на +7!"; n=7;}        else {n=6;} }if (n==7){x8=1; z8=75;c8 = x8 + rand() % z8;        if (c8==2)        {Label4->Caption="Предмет усилен на +8!";n=8;}        else {n=7;} }if (n==8){x9=1; z9=100;c9 = x9 + rand() % z9;        if (c9==2)        {Label4->Caption="Предмет усилен на +9!"; n=9;}        else {n=8;} }if (n==9){x10=1; z10=300;c10 = x10 + rand() % z10;        if (c10==2)        {Label4->Caption="Предмет усилен на +10!"; n=10;}        else {n=9;} }if (n==10){Image2->Enabled=false;}Label1->Caption=n;zn++;Label2->Caption=zn;}
Link to comment
Share on other sites

Daniilka, мега-программер, азаза.

с case лично не знаком, пока что, потом почитаю и переделаю, может быть) спасибо за совет))

 

Link to comment
Share on other sites

Daniilka, мега-программер, азаза.

 

Шутник года
Link to comment
Share on other sites

собрал некий "симулятор точки предметов" http://rghost.ru/54817185

конечно, шанс не такой как в игре, и даже не приблизительный, но поиграться будет забавно))

int z1,x1,c1,z2,x2,c2,z3,x3,c3,z4,x4,c4,z5,x5,c5,z6,x6,c6,z7,x7,c7,z8,x8,c8,z9,x9,c9,z10,x10,c10;if (n==0){x1=1; z1=3;c1 = x1 + rand() % z1;        if (c1==2)        {Label4->Caption="Предмет усилен на +1!"; n=1;}        else {n=0;} }if (n==1){x2=1; z2=5;c2 = x2 + rand() % z2;        if (c2==2)        {Label4->Caption="Предмет усилен на +2!"; n=2;}        else {n=1; }}if (n==2){x3=1; z3=10;c3 = x3 + rand() % z3;        if (c3==2)        {Label4->Caption="Предмет усилен на +3!"; n=3;}        else {n=2;}}if (n==3){x4=1; z4=15;c4 = x4 + rand() % z4;        if (c4==2)        {Label4->Caption="Предмет усилен на +4!"; n=4;}        else {n=3;} }if (n==4){x5=1; z5=25;c5 = x5 + rand() % z5;        if (c5==2)        {Label4->Caption="Предмет усилен на +5!"; n=5;}        else {n=4; }}if (n==5){x6=1; z6=40;c6 = x6 + rand() % z6;        if (c6==2)        {Label4->Caption="Предмет усилен на +6!"; n=6;}        else {n=5;} }if (n==6){x7=1; z7=50;c7 = x7 + rand() % z7;        if (c7==2)        {Label4->Caption="Предмет усилен на +7!"; n=7;}        else {n=6;} }if (n==7){x8=1; z8=75;c8 = x8 + rand() % z8;        if (c8==2)        {Label4->Caption="Предмет усилен на +8!";n=8;}        else {n=7;} }if (n==8){x9=1; z9=100;c9 = x9 + rand() % z9;        if (c9==2)        {Label4->Caption="Предмет усилен на +9!"; n=9;}        else {n=8;} }if (n==9){x10=1; z10=300;c10 = x10 + rand() % z10;        if (c10==2)        {Label4->Caption="Предмет усилен на +10!"; n=10;}        else {n=9;} }if (n==10){Image2->Enabled=false;}Label1->Caption=n;zn++;Label2->Caption=zn;}
На моём устройстве вылазит ошибка о нехватке файла.

Сделай так, как написал Fobb

QzxNsj, скорее всего экзешник из папки дебаг поэтому и не работает без дополнительных либ. Установи конфигурацию release и нажми F7

Link to comment
Share on other sites

На моём устройстве вылазит ошибка о нехватке файла.

Сделай так, как написал Fobb

 

http://rghost.ru/54828521
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...