ChrisG Posted Április 16, 2008 Share Posted Április 16, 2008 Sziasztok! Holnap irok java programozásból dolgozatot(tömbök), de ezt az 1 feladatot nem tom értelmezni! Légyszives írja le vki, lépésről lépésre, h mi történik! A feladat a következö: int[] iArray = new int[5]; for (int i=0; i<iArray.length; i++) iArray = i*10; double[] dArray = new double[20]; for (int i=0; i<dArray.length; i++) dArray = Console.readDouble(); Köszönöm Idézés Link to comment Share on other sites More sharing options...
Smurf Posted Április 16, 2008 Share Posted Április 16, 2008 Remélem, még nem késő. Hidden Content Give reaction or reply to this topic to see the hidden content. Létrehoz egy 5 elemű, integerekből (egész számok) álló tömböt iArray néven Hidden Content Give reaction or reply to this topic to see the hidden content. Végiglépked a tömb elemein és minden elemet beállít az indexének (i) tízszeresére. Tehát iArray[5] = 50, iArrany[0] = 0, iArray[2] = 20, stb. Hidden Content Give reaction or reply to this topic to see the hidden content. Létrehoz egy 20 elemű duplapontosságú lebegőpontos számokból (double) álló tömböt dArray néven. Hidden Content Give reaction or reply to this topic to see the hidden content. Végiglépked a tömb elemein, és mindegyiket beállítja a konzolról (standard szöveges input) beolvasott számra. Két elem beírása közt inputra (enter) vár, azaz a program addig nem lép át a következő tömbelem beállítására amíg az előző nem kapott értéket. Idézés Link to comment Share on other sites More sharing options...
ChrisG Posted Április 17, 2008 Author Share Posted Április 17, 2008 Köszi! Sokat segítettél! Még1szer kösz! Idézés Link to comment Share on other sites More sharing options...
Recommended Posts
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.