Προς το περιεχόμενο

Q: Fortran


Dvs

Προτεινόμενες αναρτήσεις

Δημοσ.

Dokimase na xrhsimopoihseis thn "ichar©" opoy c einai o xarakthras soy. Na soy pw thn alh8eia den kserw an 8a soy dwsei ton ari8mo poy einai assigned sth metablhth c h ton akeraio ari8mo poy antiprwsopeyei eswterikws to c. Dokimase to pantws, de nomizw na exeis na xseis tipota.

 

Ayto mporeis na to peis kai type-casting an kai 8a elega oti einai perissotero convertion. To type casting pisteyw oti anaferetai kyriws se antikeimena kai oxi toso poly se arxegonoys typoys.

Δημοσ.

Auto itan mia lisi . Alla giati na to kano auto ama iparxei kapia sinartisi antistoixi tis val? (eiani 100% pio grigori apo tin metatropi pou tha ftiaxo)

Δημοσ.

Vasika mia geniki lisi stin periptwsi poy diavazeis ton taktito arithmo enos xaraktira pou einai ena apo ta psifia 0-9 kai theleis na to metatrepseis sto adistoixo akeraio psifio einai na afereis kathe fora to 48.Px ean diavaseis to 1(pou exei taktiko arithmo 49) tha kaneis 49-48=1 kai to apotelesma tha einai o akeraios 1.Adistoixa ean thes na tipwseis ena psifio toy prostheteis to 48 (kai perneis ton taktiko arithmo toy) kai ton tipwneis <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> .Auta kai pisteuw na voithisa katholoy

Δημοσ.

Kala edaxei to kseskises re oxi kai 100% katarxas apo apopsi taxititas mono kai mono i klitiki akolouthia twn entolwn poy tha ektelestoun gia thn klish ths sinartisis,proetoimasia stoivas perasma parametrwn...+ edoes tis sinartisis poy tha ektelestoun,epistrofi apotelesmatos, apokatastasi stoivas++ tha parei sigoura poly perissotero xrono apo to na to kaneis monos sou me mia aferesoula alla kai egw ean iparxei kati etoimo den tha kathomouna na to grapsw monos moy <img border="0" title="" alt="[Wink]" src="images/icons/wink.gif" /> ---A kai gia na thimomaste kai ta palia:Pedi tis Crest=???????

Δημοσ.

Tora to kseskises <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> tha do , oti einai pio eukolo (siga min psaxo kai gia tin fortran...)

 

checkare pm <img border="0" title="" alt="[Razz]" src="images/icons/tongue.gif" />

Δημοσ.

telika exo to exis provlima: metatrepo ton "char aritmo" ston taktiko tou alla meta pos dimiourgo ton teliko aritmo?

 

(px. to "123" pos tha ginei 123 ? opos kai na "ennoso" ta 1 2 3 mou vgazei sinexeia error sto compiling)

 

<small>[ 28-04-2002, 19:34: Το μήνυμα επεξεργάστηκε από: Dvs ]</small>

Δημοσ.

Loipon to 123 einai katarxas 3 xaraktires kai oxi enas opote ean diavaseis apo to pliktrologio to 123 tha pareis:49,50,51 poy einai oi taktikoi arithmoi twn 1,2,3.Tora ean exw katalavei kala theleis ta tipwseis to 123 to opio vriskete se mia akerea metavliti.Ean prokeite gia auto tha kaneis to exis:

x=123 DIV 100;

y=123 MOD 100;

x=x+48

emfanizeis to x(opote perneis to 1 stin othoni)

x=y DIV 10;

y=y MOD 10;

x=x+48;

y=y+48;

emfanizeis kai to x kai meta to y.

Tora ean thes kati to opoio na douleuei me opoiondipote arithmo tote den einai diskolo apla tha prepei na ilopoiiseis mia epanaliptiki methodo ipologismou.Egw sou edwsa parapanw mia algirithmiki diadikasia gia to 123 mono alla kai i genikoteri methodos den einai provlima <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" />

Δημοσ.

den thelo auto <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" />

Ti kano akrivos. Diavazo apo to pliktrologio mia character metavliti x*30 (esto. x = x^2+27*x+7-25*x)

Exo ftiaxei algorithmo pou va vriskei ton sintelesti pou thelo kathe fora(proteraiotita praxeon) alla mou ton epistrefei os char eno thelo san int i real gia na kano praxeis (px. na min mou girnaei "27" alla 27.

Px. stin peiptosi tou 27*x exo ftiaxei pou esoterika vriskei to to 2 kai to 7 alla thelo 27 <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> [diladi kapos prepei na ta ennoso]

integer :: x

integer :: y

integer :: result

.

. ! i sinartisi edo

.

! tora x=2 kai x=7

! pos tha kano to result = 27

AUTA DEN DOULEUEOUN:

result = x & y

result = x,y

result = x+y (dinei 3 :>)

result = 'x','y'

result = 'x'+'y'

 

Diladi thelo na sinenoso 2 int se 1 (OXI PROSTESI,auto pou einai stin c++ strcat)

 

<small>[ 29-04-2002, 11:48: Το μήνυμα επεξεργάστηκε από: Dvs ]</small>

Δημοσ.

Re sy einai poly aplo diavazeis to 2 to vazeis sto X.Meta polaplasiazeis to 2*10 kai prostheteis kai to 7 kai exeis se enan integer to 27 <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> .Etsi ginete pollaplasiazeis me to 10 kai prostheteis kai to epomeno psifio px 27*10+8=278 <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" />

Δημοσ.

re eisai sovaros? <img border="0" title="" alt="[smile]" src="images/icons/smile.gif" /> Prepei na ginetai poli apla auto. Siga min kano olokliri function gia na enoso 2 int! auti i gamimemni i fortran exei gamo tis sinartiseis gia olokliromata,midadikous kai den exei gia na ennoseis 2 aritmous? den mporei...

Δημοσ.

Oraios eisai re esy den ftanei poy sou proteinw kai kati ta akouw kai apo panw signwmi kiolas poy den anoixa olokliro to reference stin fortran gia na dw pia function to kanei auto <img border="0" title="" alt="[Mad]" src="images/icons/mad.gif" /> .Telos padon einai poly alpo alla ean variese esy toso poly tha katsw na stin grapsw egw

Δημοσ.

min ta perneis re

apla leo mipos to xerei kapios. to help file tis fortran to exo pidixei alla to sigekrimeno den to exo vrei. mexri kai ebook me oles tis function katevasa kai den to eixe mesa.

 

ama thes na to grapseis den me xalaei ...

 

(plaka kano etsi)

Δημοσ.

Koita exw ena etoimo se Java poy kanei autin tin douleia:

</font><blockquote><font size="1" face="Verdana, Helvetica, sans-serif">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">

static int readInt() throws IOException

{

int res = 0, ch;

boolean negative = false;

ch = System.in.read();

// αγνόησε τα κενά και τις αλλαγές

//γραμμών που τυχόν προηγούνται του ακεραίου

while (ch == ' '

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...