blogther Temat założony przez niniejszego użytkownika |
» 2012-11-02 19:16:50 niestety zaden z tych linkow mi nie pomoze bede probował narysowac to linia po lini ale nie wiem tylko jak zrobic te linie pod katem
jeszcze jedno jezeli chce aby kolor lini był czarny to co musze wpisac w nawiasie setcolor( );? |
|
DejaVu |
» 2012-11-02 19:19:02 Skoro nie rozumiesz żadnych podawanych informacji to ten temat nie ma najmniejszego sensu - naucz się najpierw podstaw programowania... |
|
cyklopek11 |
» 2012-11-02 19:23:47 |
|
blogther Temat założony przez niniejszego użytkownika |
» 2012-11-02 19:25:33 okey juz wszystko załapałem jak uda mi sie robic wszystko to pokaże Ci co udało mi sie zrobic. |
|
blogther Temat założony przez niniejszego użytkownika |
» 2012-11-02 20:42:32 okey juz skonczyłem i mam dwa problemy po piwrwsze jezeli chce zapisac wyniki pod rysunkiem to jak to zrobic a drugi to w jaki sposob pozbyc sie czarnego tła na ktorym wyswietla sie tekst co do pierwszeo problemu to jest istotniejszy bo nie da sie skompilowac i uruchomic programu #include <iostream.h> #include <winbgim.h> #include <math.h>
using namespace std;
int main( int argc, char * argv[] ) { int a, F; float x, y; cout << "Podaj wartosc sily jaka dziala na belke, aby program wyzaczyl \nreakcje podporowe w ukladzie przedstawionym na rysunku." << endl; cout << "Podaj wartosci sily F = "; cin >> F; y =( 1 / 2 ) * F; x = F + y; initwindow( 640, 480 ); setfillstyle( SOLID_FILL, WHITE ); bar( 0, 0, getmaxx(), getmaxy() ); setcolor( 0 ); settextstyle( 10, 0, 3 ); outtextxy( 60, 160, "A" ); outtextxy( 410, 180, "B" ); setlinestyle( 0, 2, 5 ); line( 100, 200, 400, 200 ); line( 90, 220, 100, 200 ); line( 100, 200, 110, 220 ); line( 80, 220, 120, 220 ); line( 390, 220, 400, 200 ); line( 400, 200, 410, 220 ); line( 380, 220, 420, 220 ); line( 380, 230, 420, 230 ); setlinestyle( 0, 2, 1 ); line( 70, 230, 80, 220 ); line( 80, 230, 90, 220 ); line( 90, 230, 100, 220 ); line( 100, 230, 110, 220 ); line( 110, 230, 120, 220 ); line( 120, 230, 130, 220 ); line( 370, 240, 380, 230 ); line( 380, 240, 390, 230 ); line( 390, 240, 400, 230 ); line( 400, 240, 410, 230 ); line( 410, 240, 420, 230 ); line( 420, 240, 430, 230 ); setlinestyle( 0, 2, 2 ); settextstyle( 10, 0, 2 ); outtextxy( 145, 230, "0,5a" ); outtextxy( 305, 230, "0,5a" ); line( 100, 200, 100, 250 ); line( 250, 200, 250, 250 ); line( 400, 200, 400, 250 ); line( 100, 250, 400, 250 ); line( 100, 250, 110, 240 ); line( 100, 250, 110, 260 ); line( 240, 240, 250, 250 ); line( 240, 260, 250, 250 ); line( 250, 250, 260, 240 ); line( 250, 250, 260, 260 ); line( 390, 240, 400, 250 ); line( 390, 260, 400, 250 ); setcolor( 1 ); settextstyle( 10, 0, 5 ); outtextxy( 270, 120, "F" ); setlinestyle( 0, 1, 3 ); line( 250, 100, 250, 200 ); line( 240, 190, 250, 200 ); line( 250, 200, 260, 190 ); setcolor( 4 ); settextstyle( 10, 0, 3 ); outtextxy( 20, 210, "Rax" ); outtextxy( 110, 110, "Ray" ); outtextxy( 420, 120, "Rb" ); line( 100, 100, 100, 200 ); line( 400, 100, 400, 200 ); line( 90, 110, 100, 100 ); line( 100, 100, 110, 110 ); line( 390, 110, 400, 100 ); line( 400, 100, 410, 110 ); line( 20, 200, 100, 200 ); line( 90, 190, 100, 200 ); line( 90, 210, 100, 200 ); setcolor( 2 ); settextstyle( 10, 0, 2 ); outtext( "Schematyczny rysunek belki" ); outtextxy( 100, 300, "ODP:" ); outtextxy( 100, 320, "Rax = 0" ); outtextxy( 100, 340, "Ray = " << x << ); outtextxy( 100, 363, "Rb = " << y << ); system( "PAUSE" ); closegraph(); return EXIT_SUCCESS; }
|
|
blogther Temat założony przez niniejszego użytkownika |
» 2012-11-02 21:04:28 teraz program kompiluje sie i uruchamia ale dalej pozostaje problem czarnego tła i braku wynikow
#include <iostream.h> #include <winbgim.h> #include <math.h>
using namespace std;
int main( int argc, char * argv[] ) { int a, F; float x, y; cout << "Podaj wartosc sily jaka dziala na belke, aby program wyzaczyl \nreakcje podporowe w ukladzie przedstawionym na rysunku." << endl; cout << "Podaj wartosci sily F = "; cin >> F; initwindow( 640, 480 ); setfillstyle( SOLID_FILL, WHITE ); bar( 0, 0, getmaxx(), getmaxy() ); setcolor( 0 ); settextstyle( 10, 0, 3 ); outtextxy( 60, 160, "A" ); outtextxy( 410, 180, "B" ); setlinestyle( 0, 2, 5 ); line( 100, 200, 400, 200 ); line( 90, 220, 100, 200 ); line( 100, 200, 110, 220 ); line( 80, 220, 120, 220 ); line( 390, 220, 400, 200 ); line( 400, 200, 410, 220 ); line( 380, 220, 420, 220 ); line( 380, 230, 420, 230 ); setlinestyle( 0, 2, 1 ); line( 70, 230, 80, 220 ); line( 80, 230, 90, 220 ); line( 90, 230, 100, 220 ); line( 100, 230, 110, 220 ); line( 110, 230, 120, 220 ); line( 120, 230, 130, 220 ); line( 370, 240, 380, 230 ); line( 380, 240, 390, 230 ); line( 390, 240, 400, 230 ); line( 400, 240, 410, 230 ); line( 410, 240, 420, 230 ); line( 420, 240, 430, 230 ); setlinestyle( 0, 2, 2 ); settextstyle( 10, 0, 2 ); outtextxy( 145, 230, "0,5a" ); outtextxy( 305, 230, "0,5a" ); line( 100, 200, 100, 250 ); line( 250, 200, 250, 250 ); line( 400, 200, 400, 250 ); line( 100, 250, 400, 250 ); line( 100, 250, 110, 240 ); line( 100, 250, 110, 260 ); line( 240, 240, 250, 250 ); line( 240, 260, 250, 250 ); line( 250, 250, 260, 240 ); line( 250, 250, 260, 260 ); line( 390, 240, 400, 250 ); line( 390, 260, 400, 250 ); setcolor( 1 ); settextstyle( 10, 0, 5 ); outtextxy( 270, 120, "F" ); setlinestyle( 0, 1, 3 ); line( 250, 100, 250, 200 ); line( 240, 190, 250, 200 ); line( 250, 200, 260, 190 ); setcolor( 4 ); settextstyle( 10, 0, 3 ); outtextxy( 20, 210, "Rax" ); outtextxy( 110, 110, "Ray" ); outtextxy( 420, 120, "Rb" ); line( 100, 100, 100, 200 ); line( 400, 100, 400, 200 ); line( 90, 110, 100, 100 ); line( 100, 100, 110, 110 ); line( 390, 110, 400, 100 ); line( 400, 100, 410, 110 ); line( 20, 200, 100, 200 ); line( 90, 190, 100, 200 ); line( 90, 210, 100, 200 ); setcolor( 2 ); settextstyle( 10, 0, 2 ); outtext( "Schematyczny rysunek belki" ); outtextxy( 100, 300, "ODP:" ); outtextxy( 100, 320, "Rax = 0" ); outtextxy( 100, 340, "Ray = " ); outtextxy( 100, 363, "Rb = " ); system( "PAUSE" ); closegraph(); return EXIT_SUCCESS; }
|
|
blogther Temat założony przez niniejszego użytkownika |
» 2012-11-02 23:50:15 czy ktoś mogłby mi pomoc w rozwiazaniu tych problemow? |
|
DejaVu |
» 2012-11-03 00:14:47 Poszukaj w dokumentacji - dostałeś linki. |
|
1 « 2 » |